docs: add $# comment line syntax
This commit is contained in:
parent
1ddee9ea9e
commit
7df105d02a
|
|
@ -36,6 +36,7 @@ Transcript-based shell integration test runner. Bun + TypeScript.
|
||||||
- `...` inline = matches any characters on that line
|
- `...` inline = matches any characters on that line
|
||||||
- `[N]` on last line of expected output = assert exit code N
|
- `[N]` on last line of expected output = assert exit code N
|
||||||
- `[*]` = assert any non-zero exit code; default expects 0
|
- `[*]` = assert any non-zero exit code; default expects 0
|
||||||
|
- `$#` comment line = not executed, no output expected (e.g. `$# start the server`)
|
||||||
- `#` after a command = comment (stripped); `#` in expected output is literal
|
- `#` after a command = comment (stripped); `#` in expected output is literal
|
||||||
- `@env KEY=VALUE` before first command = set environment variable
|
- `@env KEY=VALUE` before first command = set environment variable
|
||||||
- `@setup path.shout` before first command = prepend commands (and `@env`) from another file
|
- `@setup path.shout` before first command = prepend commands (and `@env`) from another file
|
||||||
|
|
|
||||||
10
README.md
10
README.md
|
|
@ -30,6 +30,16 @@ ls: missing: No such file or directory
|
||||||
|
|
||||||
`[1]` after the expected output matches the exit code.
|
`[1]` after the expected output matches the exit code.
|
||||||
|
|
||||||
|
`$#` is a comment line — not executed, no output expected:
|
||||||
|
|
||||||
|
```
|
||||||
|
$# start the server
|
||||||
|
$ my-server &
|
||||||
|
$# now test it
|
||||||
|
$ curl localhost:8080
|
||||||
|
OK
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,12 @@
|
||||||
<span class="output">Homebrew 5</span><span class="wildcard">...</span></code></pre>
|
<span class="output">Homebrew 5</span><span class="wildcard">...</span></code></pre>
|
||||||
<p><code class="wildcard">...</code> matches anything — inline or across lines.</p>
|
<p><code class="wildcard">...</code> matches anything — inline or across lines.</p>
|
||||||
<p><code class="exit-code">[1]</code> asserts the exit code.</p>
|
<p><code class="exit-code">[1]</code> asserts the exit code.</p>
|
||||||
|
<p><code class="dim">$#</code> starts a comment line — not executed, no output expected.</p>
|
||||||
|
<pre><code><span class="prompt">$</span><span class="comment"># start the server</span>
|
||||||
|
<span class="prompt">$</span> <span class="cmd">my-server &</span>
|
||||||
|
<span class="prompt">$</span><span class="comment"># now test it</span>
|
||||||
|
<span class="prompt">$</span> <span class="cmd">curl localhost:8080</span>
|
||||||
|
<span class="output">OK</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user