diff options
Diffstat (limited to 'unit-tests/test/script/parser')
-rw-r--r-- | unit-tests/test/script/parser/description.test | 44 | ||||
-rw-r--r-- | unit-tests/test/script/parser/setup-teardown.test | 8 |
2 files changed, 52 insertions, 0 deletions
diff --git a/unit-tests/test/script/parser/description.test b/unit-tests/test/script/parser/description.test index 881cb5b..c2c441b 100644 --- a/unit-tests/test/script/parser/description.test +++ b/unit-tests/test/script/parser/description.test @@ -6,6 +6,13 @@ EOI cmd EOO +$* <<EOI >>EOO # trail-id +cmd : foo +EOI +: id:foo +cmd +EOO + $* <<EOI >>EOO # summary : foo bar cmd @@ -14,6 +21,13 @@ EOI cmd EOO +$* <<EOI >>EOO # trail-summary +cmd: foo bar +EOI +: sm:foo bar +cmd +EOO + $* <<EOI >>EOO # id-summary : foo-bar : foo bar @@ -131,6 +145,36 @@ EOI cmd EOO +$* <<EOI >>EOO # trail-compound +cmd1; +cmd2: foo +EOI +: id:foo +cmd1 +cmd2 +EOO + +$* <<EOI 2>>EOE != 0 # empty +: +: +cmd +EOI +testscript:1:1: error: empty description +EOE + +$* <<EOI 2>>EOE != 0 # trail-empty +cmd: +EOI +testscript:1:4: error: empty description +EOE + +$* <<EOI 2>>EOE != 0 # both +: foo +cmd : bar +EOI +testscript:2:1: error: both leading and trailing description +EOE + # Legal places for a description. # $* <<EOI >>EOO # legal-var diff --git a/unit-tests/test/script/parser/setup-teardown.test b/unit-tests/test/script/parser/setup-teardown.test index 57528ad..5d30ed4 100644 --- a/unit-tests/test/script/parser/setup-teardown.test +++ b/unit-tests/test/script/parser/setup-teardown.test @@ -2,10 +2,18 @@ $* <"+cmd;" 2>>EOE != 0 # semi-after-setup testscript:1:5: error: ';' after setup command EOE +$* <"+cmd:" 2>>EOE != 0 # colon-after-setup +testscript:1:5: error: ':' after setup command +EOE + $* <"-cmd;" 2>>EOE != 0 # semi-after-tdown testscript:1:5: error: ';' after teardown command EOE +$* <"-cmd:" 2>>EOE != 0 # colon-after-tdown +testscript:1:5: error: ':' after teardown command +EOE + $* <<EOI 2>>EOE != 0 # setup-in-test cmd; +cmd |