tree: 6031ec7a502654e4fbd9b69a2f68cd69807f081d [path history] [tgz]
  1. fail/
  2. regress/
  3. asm-assignment-undeclared.js
  4. asm-assignment-undeclared.out
  5. asm-function-mismatch-def.js
  6. asm-function-mismatch-def.out
  7. asm-function-mismatch-use.js
  8. asm-function-mismatch-use.out
  9. asm-function-redefined.js
  10. asm-function-redefined.out
  11. asm-function-undefined.js
  12. asm-function-undefined.out
  13. asm-function-variable-collision.js
  14. asm-function-variable-collision.out
  15. asm-import-wrong-annotation.js
  16. asm-import-wrong-annotation.out
  17. asm-import-wrong-object.js
  18. asm-import-wrong-object.out
  19. asm-linking-bogus-heap.js
  20. asm-linking-bogus-heap.out
  21. asm-linking-bogus-stdlib.js
  22. asm-linking-bogus-stdlib.out
  23. asm-linking-missing-heap.js
  24. asm-linking-missing-heap.out
  25. asm-missing-parameter-annotation.js
  26. asm-missing-parameter-annotation.out
  27. asm-missing-return-annotation.js
  28. asm-missing-return-annotation.out
  29. asm-table-mismatch-def.js
  30. asm-table-mismatch-def.out
  31. asm-table-mismatch-use.js
  32. asm-table-mismatch-use.out
  33. asm-table-redefined.js
  34. asm-table-redefined.out
  35. asm-table-undefined.js
  36. asm-table-undefined.out
  37. asm-table-variable-collision.js
  38. asm-table-variable-collision.out
  39. message.isolate
  40. message.status
  41. non-use-strict-hex-escape.js
  42. non-use-strict-hex-escape.out
  43. non-use-strict-octal-escape.js
  44. non-use-strict-octal-escape.out
  45. non-use-strict-uhex-escape.js
  46. non-use-strict-uhex-escape.out
  47. nonstrict-arguments.js
  48. nonstrict-arguments.out
  49. nonstrict-eval.js
  50. nonstrict-eval.out
  51. nonstrict-with.js
  52. nonstrict-with.out
  53. object-binding-pattern-await-computed-name.js
  54. object-binding-pattern-await-computed-name.out
  55. README.md
  56. strict-octal-indirect-regexp.js
  57. strict-octal-indirect-regexp.out
  58. strict-octal-regexp.js
  59. strict-octal-regexp.out
  60. testcfg.py
  61. try-catch-finally-no-message.js
  62. try-catch-finally-no-message.out
  63. try-catch-finally-return-in-finally.js
  64. try-catch-finally-return-in-finally.out
  65. try-finally-return-in-finally.js
  66. try-finally-return-in-finally.out
  67. wasm-trace-memory-interpreted.js
  68. wasm-trace-memory-interpreted.out
  69. wasm-trace-memory-liftoff.js
  70. wasm-trace-memory-liftoff.out
  71. wasm-trace-memory.js
  72. wasm-trace-memory.out
test/message/README.md

JavaScript tests with expected output

Tests in test/message pass if the output matches the expected output. Message tests are particularly useful when checking for exact error messages.

Tests and their expected output must have the same filename, with the .js and .out extension.

foo.js
foo.out

All tests must end with an exception. The test runner does not handle output from multiple runs, e.g., --stress-opt. Without an exception, the output will be generated several times and the comparison will fail.

You can use a regex in the expected output. Instead of the exact path. use

*%(basename)s:7: SyntaxError: Detected cycle while resolving name 'a'

Empty lines are ignored in the comparison, but whitespaces are not.

Exact details of the test runner are in testcfg.py.