summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-25 15:18:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-25 15:18:28 +0200
commit3d1c4a2746d22f791fa50ec5d8b593c9c6181f4e (patch)
tree94f99496f4bbdbd7157e3cc698e8091737e872cd
parent05ef56ee44198aed563a66443fb479598819f779 (diff)
Adjust for literal here-document support in testscript
-rw-r--r--tests/file/testscript2
-rw-r--r--tests/headings/testscript12
-rw-r--r--tests/toc/testscript34
-rw-r--r--unit-tests/lexer/testscript52
-rw-r--r--unit-tests/parser/testscript4
5 files changed, 52 insertions, 52 deletions
diff --git a/tests/file/testscript b/tests/file/testscript
index 3e7c18c..c46d1ab 100644
--- a/tests/file/testscript
+++ b/tests/file/testscript
@@ -133,7 +133,7 @@ cat <<EOI >>>test.cli;
-a '''
-a '"'
EOI
-$* --file test.cli >>EOO
+$* --file test.cli >>"EOO"
-a
a"b"c
-a
diff --git a/tests/headings/testscript b/tests/headings/testscript
index 0c31f99..0a6a9de 100644
--- a/tests/headings/testscript
+++ b/tests/headings/testscript
@@ -10,17 +10,17 @@ test = $effect($cli.path)
:
cat <<EOI >>>map.cli;
"
-\\h1|Heading 1|
+\h1|Heading 1|
-\\h|Heading 1.1|
+\h|Heading 1.1|
-\\h2|Heading 1.1.1|
+\h2|Heading 1.1.1|
-\\h|Heading 1.2|
+\h|Heading 1.2|
-\\h2|Heading 1.2.1|
+\h2|Heading 1.2.1|
-\\h1|Heading 2|
+\h1|Heading 2|
"
EOI
$* --generate-html --stdout map.cli >>EOO
diff --git a/tests/toc/testscript b/tests/toc/testscript
index 76a28eb..2ab503c 100644
--- a/tests/toc/testscript
+++ b/tests/toc/testscript
@@ -7,60 +7,60 @@ test = $effect($cli.path)
: toc
:
cat <<EOI >>>toc.cli;
-"\\h1|Table of Contents|"
-"\\\$TOC\$"
+"\h1|Table of Contents|"
+"\$TOC$"
"
-\\h0#preface|Preface|
+\h0#preface|Preface|
This document describes something awesome.
-\\h#about-document|About This Document|
+\h#about-document|About This Document|
And this document is also awesome.
-\\h#more-information|More Information|
+\h#more-information|More Information|
It is so awesome that no further information will be required."
"
-\\H#part1|PART I|
+\H#part1|PART I|
Start of part one.
-\\h1#intro|Introduction|
+\h1#intro|Introduction|
Beginning of the first chapter.
-\\h#arch-flow|Architecture and Workflow|
+\h#arch-flow|Architecture and Workflow|
Some basics.
-\\h#benefits|Benefits|
+\h#benefits|Benefits|
You will like them.
-\\h1#hello|Hello World|
+\h1#hello|Hello World|
Beginning of the second chapter.
-\\h#hell-setup|Setup|
+\h#hell-setup|Setup|
More basics.
-\\h#hello-compile|Compiling|
+\h#hello-compile|Compiling|
How to build the example
-\\h2#hello-compile-gcc|Compiling with GCC|
+\h2#hello-compile-gcc|Compiling with GCC|
-GCC. For Clang see \\l{#hello-compile-clang Compiling with Clang}.
+GCC. For Clang see \l{#hello-compile-clang Compiling with Clang}.
-\\h2#hello-compile-clang|Compiling with Clang|
+\h2#hello-compile-clang|Compiling with Clang|
-Clang. For GCC see \\l{#hello-compile-gcc Compiling with GCC}.
+Clang. For GCC see \l{#hello-compile-gcc Compiling with GCC}.
-\\h#hello-conclusion|Conclusion|
+\h#hello-conclusion|Conclusion|
Some remarks.
"
diff --git a/unit-tests/lexer/testscript b/unit-tests/lexer/testscript
index fb4f862..48d06ad 100644
--- a/unit-tests/lexer/testscript
+++ b/unit-tests/lexer/testscript
@@ -58,21 +58,21 @@ EOO
:
cat <<EOI >>>test.cli;
'a'
-'\\n'
-'\\\\'
-'\\0'
-'\\''
-'\\xaf'
-'\\111'
+'\n'
+'\\'
+'\0'
+'\''
+'\xaf'
+'\111'
EOI
$* test.cli >>EOO
'a'
-'\\n'
-'\\\\'
-'\\0'
-'\\''
-'\\xaf'
-'\\111'
+'\n'
+'\\'
+'\0'
+'\''
+'\xaf'
+'\111'
<EOS>
EOO
@@ -80,12 +80,12 @@ EOO
:
cat <<EOI >>>test.cli;
"abc";
-"a\\nb";
-"abc\\\\";
-"aaa\\0";
-"\\"";
-"a\\xaf";
-"a\\111";
+"a\nb";
+"abc\\";
+"aaa\0";
+"\"";
+"a\xaf";
+"a\111";
"abc""def";
"abc" "def";
"abc
@@ -96,17 +96,17 @@ EOI
$* test.cli >>EOO
"abc"
;
-"a\\nb"
+"a\nb"
;
-"abc\\\\"
+"abc\\"
;
-"aaa\\0"
+"aaa\0"
;
-"\\""
+"\""
;
-"a\\xaf"
+"a\xaf"
;
-"a\\111"
+"a\111"
;
"abc""def"
;
@@ -150,11 +150,11 @@ EOO
: 005
:
cat <<EOI >>>test.cli;
-\(abc, 123 - 345, 12.34)
+(abc, 123 - 345, 12.34)
<foo, bar::baz, 123*345>
EOI
$* test.cli >>EOO
-\(abc, 123 - 345, 12.34)
+(abc, 123 - 345, 12.34)
<foo, bar::baz, 123*345>
<EOS>
EOO
diff --git a/unit-tests/parser/testscript b/unit-tests/parser/testscript
index 0ae0378..08226a5 100644
--- a/unit-tests/parser/testscript
+++ b/unit-tests/parser/testscript
@@ -164,9 +164,9 @@ class c
char -init2 = 'c';
int -init3 = -5;
bool -inti4 = true;
- long -init5 = \(2 * 4 - 5);
+ long -init5 = (2 * 4 - 5);
type -init6 = type::default_value;
- type -init7 \(abc, 2 - 1);
+ type -init7 (abc, 2 - 1);
};
EOI
$* test.cli >:""