Commit Graph

18 Commits

Author SHA1 Message Date
eef0f4d2dc Merge branch 'rust-rewrite'
# Conflicts:
#	package.json
#	src/cli/index.ts
#	src/parse.test.ts
#	src/parse.ts
2026-04-02 15:30:50 -07:00
db5a7d66e6 omg rust 2026-04-02 15:18:22 -07:00
724f40c25d Allow @def body to start on the next continuation line
Previously, a backslash immediately after the macro name (with no
body on the first line) produced a leading newline. Now an empty
prefix is handled so the body begins cleanly on the continuation line.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 13:50:01 -07:00
9943641c02 Allow @def directives in setup files and fix macro precedence
User macros now correctly override setup macros instead of
last-write-wins. Also hardens @def continuation parsing to reject
trailing backslash at EOF, blank lines, and comment lines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 13:24:37 -07:00
7231c07a8b Apply macro expansion to teardown commands and fix @def continuation parsing
Teardown commands were missing the expandMacro call that setup and
parsed commands already received. Also relax the continuation-line
guard to catch bare `$` (not just `$ `) so lines like `$VAR` are
not silently consumed as continuation text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 11:59:08 -07:00
f508e30fcb Merge setup and user macros into a single map and harden @def parsing
User macros already overwrote setup macros, so two separate maps were
unnecessary. Also prevents @def continuations from silently swallowing
command or directive lines, and stops expanding macros in teardown.
2026-03-19 11:50:15 -07:00
ce1503a9d4 Add @def directive for command macro substitution
Macros let setup files define reusable command shorthands that
test files can invoke by name or override with their own definition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 11:28:59 -07:00
24981c6cc0 Merge branch 'code-cleanup'
# Conflicts:
#	src/parse.ts
#	src/run.ts
#	src/update.ts
2026-03-13 14:08:37 -07:00
e8bc4be382 Add @teardown directive support 2026-03-12 20:48:51 -07:00
1ddee9ea9e Add support for $# comment lines in parser 2026-03-12 16:12:38 -07:00
e829c67e88 Support escaped $ in expected output lines 2026-03-12 15:22:38 -07:00
c843ba7c22 Simpler setup files 2026-03-10 21:46:58 -07:00
5d2a4618d9 Refactor: extract shared utils, clean up deps 2026-03-10 15:12:45 -07:00
aeef6041ec Add exit code expectations and fix @setup validation 2026-03-10 10:20:23 -07:00
e97be11a0c Fix setup env precedence and validate directives 2026-03-10 10:03:17 -07:00
86eba1a624 docs: add @env/@setup directives to CLAUDE.md 2026-03-10 09:45:43 -07:00
70008d16b9 Add @env, @setup directives and --port-from flag 2026-03-10 09:32:06 -07:00
17268b50f0 Add test runner core with CLI and spec updates 2026-03-09 21:32:14 -07:00