aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test/script/parser/description.test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-28 13:01:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:36 +0200
commit08ae9246421cf2b7269dc09dab2dbd5dc5d0817a (patch)
tree727dcf6be0a382a3a41f3ebf63d624ab893c786d /unit-tests/test/script/parser/description.test
parentfac9e22e90591b4c60d0e13c10c3abccf8c96a0f (diff)
Add tests and fixes for trailing description support
Diffstat (limited to 'unit-tests/test/script/parser/description.test')
-rw-r--r--unit-tests/test/script/parser/description.test44
1 files changed, 44 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