4
0

uri-records.toml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # URI record successes
  2. [[cmd]]
  3. name = "Running with ‘uri.example’ prints the correct URI record"
  4. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} URI uri.example"
  5. stdout = { file = "outputs/uri.example.ansitxt" }
  6. stderr = { empty = true }
  7. status = 0
  8. tags = [ "uri", "madns" ]
  9. [[cmd]]
  10. name = "Running with ‘slash.uri.example’ still prints the correct URI record"
  11. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} URI slash.uri.example"
  12. stdout = { file = "outputs/slash.uri.example.ansitxt" }
  13. stderr = { empty = true }
  14. status = 0
  15. tags = [ "uri", "madns" ]
  16. [[cmd]]
  17. name = "Running with ‘utf8.uri.example’ escapes characters in the URI"
  18. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} URI utf8.uri.example"
  19. stdout = { file = "outputs/utf8.uri.example.ansitxt" }
  20. stderr = { empty = true }
  21. status = 0
  22. tags = [ "uri", "madns", "chars" ]
  23. [[cmd]]
  24. name = "Running with ‘bad-utf8.uri.example’ escapes characters in the URI and does not crash"
  25. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} URI bad-utf8.uri.example"
  26. stdout = { file = "outputs/bad-utf8.uri.example.ansitxt" }
  27. stderr = { empty = true }
  28. status = 0
  29. tags = [ "uri", "madns", "chars" ]
  30. # URI record successes (JSON)
  31. [[cmd]]
  32. name = "Running with ‘uri.example --json’ prints the correct URI record structure"
  33. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} URI uri.example --json | jq"
  34. stdout = { file = "outputs/uri.example.json" }
  35. stderr = { empty = true }
  36. status = 0
  37. tags = [ "uri", "madns", "json" ]
  38. [[cmd]]
  39. name = "Running with ‘utf8.uri.example --json’ interprets the response as UTF-8"
  40. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} URI utf8.uri.example --json | jq"
  41. stdout = { file = "outputs/utf8.uri.example.json" }
  42. stderr = { empty = true }
  43. status = 0
  44. tags = [ "uri", "madns", "chars", "json" ]
  45. [[cmd]]
  46. name = "Running with ‘bad-utf8.uri.example --json’ uses UTF-8 replacement characters"
  47. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} URI bad-utf8.uri.example --json | jq"
  48. stdout = { file = "outputs/bad-utf8.uri.example.json" }
  49. stderr = { empty = true }
  50. status = 0
  51. tags = [ "uri", "madns", "chars", "json" ]
  52. # URI record invalid packets
  53. [[cmd]]
  54. name = "Running with ‘missing-data.uri.invalid’ displays a packet length error"
  55. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} URI missing-data.uri.invalid"
  56. stdout = { empty = true }
  57. stderr = { string = "Error [protocol]: Malformed packet: record length should be at least 5, got 4" }
  58. status = 1
  59. tags = [ "uri", "madns" ]
  60. [[cmd]]
  61. name = "Running with ‘empty.uri.invalid’ displays a protocol error"
  62. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} URI empty.uri.invalid"
  63. stdout = { empty = true }
  64. stderr = { string = "Error [protocol]: Malformed packet: insufficient data" }
  65. status = 1
  66. tags = [ "uri", "madns" ]
  67. [[cmd]]
  68. name = "Running with ‘incomplete.uri.invalid’ displays a protocol error"
  69. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} URI incomplete.uri.invalid"
  70. stdout = { empty = true }
  71. stderr = { string = "Error [protocol]: Malformed packet: insufficient data" }
  72. status = 1
  73. tags = [ "uri", "madns" ]