basics.toml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Colour output
  2. [[cmd]]
  3. name = "Running dog with ‘--colour=always’ produces colourful output"
  4. shell = "dog dns.google --colour=always"
  5. stdout = { string = "\u001B[1;32mA\u001B[0m \u001B[1;34mdns.google.\u001B[0m" }
  6. stderr = { empty = true }
  7. status = 0
  8. tags = [ "live", "isp" ]
  9. [[cmd]]
  10. name = "Running dog produces an A record by default"
  11. shell = "dog dns.google"
  12. stdout = { string = "A dns.google." }
  13. stderr = { empty = true }
  14. status = 0
  15. tags = [ "live", "isp" ]
  16. [[cmd]]
  17. name = "Running dog with ‘--colour=never’ produces plain output"
  18. shell = "dog dns.google --colour=never"
  19. stdout = { string = "A dns.google." }
  20. stderr = { empty = true }
  21. status = 0
  22. tags = [ "live", "isp" ]
  23. # Default record type and transport
  24. [[cmd]]
  25. name = "Running dog with ‘-U’ produces no errors"
  26. shell = "dog dns.google -U"
  27. stdout = { string = "A dns.google." }
  28. stderr = { empty = true }
  29. status = 0
  30. tags = [ "live", "isp" ]
  31. [[cmd]]
  32. name = "Running dog with ‘A’ produces no errors"
  33. shell = "dog A dns.google"
  34. stdout = { string = "A dns.google." }
  35. stderr = { empty = true }
  36. status = 0
  37. tags = [ "live", "isp" ]
  38. [[cmd]]
  39. name = "Running dog with ‘--time’ outputs a duration"
  40. shell = "dog A dns.google --time"
  41. stdout = { string = "Ran in" }
  42. stderr = { empty = true }
  43. status = 0
  44. tags = [ "live", "isp" ]
  45. # Network errors
  46. [[cmd]]
  47. name = "Using a DNS server that does not exist on the network"
  48. shell = "dog A dns.google @non.exist --time"
  49. stdout = { string = "Ran in" }
  50. stderr = { string = "Error [network]" }
  51. status = 1
  52. tags = [ "live", "isp" ]