diff --git a/web/index.html b/web/index.html index a7bcac5..6a254dd 100644 --- a/web/index.html +++ b/web/index.html @@ -11,7 +11,7 @@ :root { --bg: #fff; --fg: #444; - --bright: #1a1a1a; + --bright: #000; --green: #1a7f37; --red: #cf222e; --dim: #888; @@ -64,6 +64,7 @@ line-height: 1; display: flex; align-items: baseline; + vertical-align: baseline; } h1 .dollar { @@ -126,17 +127,14 @@ opacity: 0.85; } - /* ---- "Write a test" box ---- */ - .hero-section { - padding: 40px 0 24px; - } - - .write-box { + /* ---- Section boxes ---- */ + .section-box { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 20px; padding-top: 16px; + margin-bottom: 24px; } .two-col { @@ -148,7 +146,6 @@ .two-col .explain h2 { margin-bottom: 16px; - color: var(--fg); } .two-col .explain p { @@ -162,41 +159,48 @@ } .two-col .explain .feature code { - padding: 2px 6px; + padding: 2px 0px; border-radius: 3px; font-size: 13px; } - .write-box pre { + .section-box pre { background: var(--bg); margin-bottom: 0; } + .section-box pre + pre { + margin-top: 12px; + } + + .section-box p:last-child { + margin-bottom: 0; + } + @media (max-width: 680px) { .two-col { grid-template-columns: 1fr; gap: 24px; } - .write-box { + .section-box { padding: 19px; } } - /* ---- Sections ---- */ - section { - padding: 0 0 32px 0; - } - h2 { font-size: 13px; font-weight: 600; - color: var(--dim); + color: var(--fg); text-transform: uppercase; letter-spacing: 0.1em; - margin-bottom: 24px; + margin-bottom: 16px; } + section { + padding: 0 0 32px 0; + } + p { margin-bottom: 16px; font-size: 15px; @@ -259,7 +263,6 @@ header { padding: 40px 0 0; } h1 { font-size: 44px; } .subtitle { font-size: 16px; } - section { padding: 24px 0; } } @@ -274,17 +277,18 @@ -
-
+
+

✓ Write a test

-

A .shout file is a shell session.

-

Commands start with $.

-

Everything else is the expected output.

+

Each .shout file is a session.

+

Commands start with $.

+

Everything else is expected output.

... matches anything — inline or across lines.

[1] asserts the exit code. Default expects 0.

Lines starting with # are comments.

+

(\# matches output starting with #.)

$ echo hello
@@ -306,43 +310,68 @@
   
-
-

Setup & teardown

-

Use @setup to share commands across test files. Use @teardown to clean up after tests — it runs regardless of pass/fail.

-
# setup.shout
+
+
+
+

✓ Setup & teardown

+

Use @setup to share commands across test files.

+

Use @teardown to clean up after tests — it runs regardless of pass/fail.

+

@teardown can appear in both .shout files and setup files. Teardown failures produce warnings but don't affect test results.

+
+
+
# setup.shout
 export DB_URL=sqlite:data/test.db
 @teardown rm -f "$SHOUT_PROJECT_DIR/data/test.db"
-
@setup setup.shout
+      
@setup setup.shout
 @teardown rm -f /tmp/extra-cleanup
 
 $ create-db && run-tests
 ...
-

@teardown can appear in both .shout files and setup files. Teardown failures produce warnings but don't affect test results.

-
+
+
+
-
-

Macros

-

Use @def to define reusable command macros.

-
@def greet echo "hello world"
+
+
+
+

✓ Macros

+

Use @def to define reusable command macros.

+

If a command matches a macro name exactly, the body is substituted. Use \ for multi-line bodies. Macros from setup files are inherited; user-file macros override them.

+
+
+
@def greet echo "hello world"
 
 $ greet
 hello world
-

If a command matches a macro name exactly, the body is substituted. Use \ for multi-line bodies — the body can start on the same line or on the next continuation line. Macros from setup files are inherited; user-file macros override them.

-
+
+ + -
-

Run it

-
$ shout test
+
+
+
+

✓ Run it

+

Each file gets a fresh temp directory and its own /bin/sh session. State carries between commands within a file.

+
+
+
$ shout test
 ...............
 15 passed in 23ms
-

Each file gets a fresh temp directory and its own /bin/sh session. State carries between commands within a file.

-
+ + + -
-

Update expectations

-
$ shout test --update
-

Rewrites your .shout files with the actual output. No more copy-pasting from the terminal.

-
+
+
+
+

✓ Update expectations

+

Rewrites your .shout files with the actual output. No more copy-pasting from the terminal.

+
+
+
$ shout test --update
+
+
+

Usage

@@ -370,12 +399,12 @@ Options:

Environment

Shout sets these variables before running your commands:

-
HOME       temp directory for this test file
-SHOUT_DIR       same temp directory
+  
HOME               temp directory for this test file
+SHOUT_DIR          same temp directory
 SHOUT_SOURCE_DIR   directory containing the .shout file
 SHOUT_PROJECT_DIR  directory where shout was invoked
-PORT            auto-assigned from 5400 (or --port-from), increments per file
-PATH            prepended with --path dirs, if any
+PORT auto-assigned from 5400 (or --port-from), increments per file +PATH prepended with --path dirs, if any

Each file runs in its own temp directory. --clean-env starts with an empty environment instead of inheriting yours.