summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Langley <mightyjo@gmail.com>2021-06-05 00:26:47 -0400
committerJoseph Langley <mightyjo@gmail.com>2021-06-05 00:26:47 -0400
commitaeb2cb553974b752f99de33a6951c815f44cb720 (patch)
tree7e72e8ba238b714df9a780101631ac6a6bd12dcd
parent5fa412a3d95b3c2168dca1a4ad9139d273207756 (diff)
downloadflex-git-aeb2cb553974b752f99de33a6951c815f44cb720.tar.gz
fix(test): Re-add test inputs to tests/
Generating these test inputs on the fly breaks VPATH builds and 'make distcheck'. Glad we have a lot fewer of them now, at least.
-rwxr-xr-x[-rw-r--r--]tests/.gitignore21
-rw-r--r--tests/array.txt2
-rw-r--r--tests/basic.txt5
-rw-r--r--tests/bol.txt1
-rw-r--r--tests/ccl.txt27
-rw-r--r--tests/debug.txt2
-rw-r--r--tests/extended.txt2
-rw-r--r--tests/fixedtrailing.txt1
-rw-r--r--tests/flexname.txt1
-rw-r--r--tests/lexcompat.txt1
-rw-r--r--tests/lineno.txt19
-rw-r--r--tests/posixlycorrect.txt1
-rw-r--r--tests/preposix.txt1
-rw-r--r--tests/quoteincomment.txt1
-rw-r--r--tests/reject.txt3
-rw-r--r--tests/tableopts.txt2
-rw-r--r--tests/vartrailing.txt15
-rw-r--r--tests/yyless.txt1
-rw-r--r--tests/yymore.txt1
-rw-r--r--tests/yymorearray.txt1
-rw-r--r--tests/yymorearraybol.txt1
-rw-r--r--tests/yyunput.txt0
22 files changed, 109 insertions, 0 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index 4aa70a6..1772b39 100644..100755
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -8,8 +8,10 @@ alloc_extra_c99
alloc_extra_c99.c
array*
!array.rules
+!array.txt
basic*
!basic.rules
+!basic.txt
bison_nr
bison_nr_scanner.[ch]
bison_nr_parser.[ch]
@@ -21,12 +23,14 @@ bison_yylval_parser.[ch]
bison_yylval_scanner.[ch]
bol*
!bol.rules
+!bol.txt
c_cxx_nr
c_cxx_nr.cc
c_cxx_r
c_cxx_r.cc
ccl*
!ccl.rules
+!ccl.txt
cxx_basic
cxx_basic.cc
cxx_multiple_scanners
@@ -37,12 +41,16 @@ cxx_yywrap.i3
cxx_yywrap.cc
debug*
!debug.rules
+!debug.txt
extended*
!extended.rules
+!extended.txt
fixedtrailing*
!fixedtrailing.rules
+!fixedtrailing.txt
flexname*
!flexname.rules
+!flexname.txt
header_nr
header_nr_scanner.[ch]
header_r
@@ -55,8 +63,10 @@ include_by_reentrant.direct
include_by_reentrant.direct.c
lexcompat*
!lexcompat.rules
+!lexcompat.txt
lineno*
!lineno.rules
+!lineno.txt
mem_nr
mem_nr.c
mem_r
@@ -71,6 +81,7 @@ posix*
!posix.rules
posixlycorrect*
!posixlycorrect.rules
+!posixlycorrect.txt
prefix_nr
prefix_nr.c
prefix_r
@@ -79,14 +90,17 @@ prefix_c99
prefix_c99.c
preposix*
!preposix.rules
+!preposix.txt
pthread.pthread
pthread.c
quoteincomment*
!quoteincomment.rules
+!quoteincomment.txt
quotes
quotes.c
reject*
!reject.rules
+!reject.txt
rescan_nr.direct
rescan_nr.direct.c
rescan_r.direct
@@ -99,22 +113,29 @@ string_c99
string_c99.c
tableopts*
!tableopts.rules
+!tableopts.txt
top
top.[ch]
vartrailing*
!vartrailing.rules
+!vartrailing.txt
yyextra_nr
yyextra_nr.c
yyextra_c99
yyextra_c99.c
yyless*
!yyless.rules
+!yyless.txt
yymore*
!yymore.rules
+!yymore.txt
!yymorearray.rules
+!yymorearray.txt
!yymorearraybol.rules
+!yymorearraybol.txt
yyunput*
!yyunput.rules
+!yyunput.txt
test-yydecl-*
!test-yydecl-gen.sh
*.opt
diff --git a/tests/array.txt b/tests/array.txt
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/array.txt
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/basic.txt b/tests/basic.txt
new file mode 100644
index 0000000..642e0fb
--- /dev/null
+++ b/tests/basic.txt
@@ -0,0 +1,5 @@
+# this is a comment
+foo = "bar"
+num = 43
+setting = false
+
diff --git a/tests/bol.txt b/tests/bol.txt
new file mode 100644
index 0000000..34a3ec2
--- /dev/null
+++ b/tests/bol.txt
@@ -0,0 +1 @@
+barfoo
diff --git a/tests/ccl.txt b/tests/ccl.txt
new file mode 100644
index 0000000..b318fe6
--- /dev/null
+++ b/tests/ccl.txt
@@ -0,0 +1,27 @@
+^alpha:0123456789 ~!@#$%^&*(){}[]':;"<>,./?\+=_-`@alpha@
+^digit:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ~!@#$%^&*(){}[]':;"<>,./?\+=_-`@digit@
+^alnum:~!@#$%^&*(){}[]':;"<>,./?\+=_-`@alnum@
+^upper:abcdefghijklmnopqrstuvwxyz0123456789 ~!@#$%^&*(){}[]':;"<>,./?\+=_-`@upper@
+^lower:ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF ~!@#$%^&*(){}[]':;"<>,./?\+=_-`@lower@
+^space:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF~!@#$%^&*(){}[]':;"<>,./?\+=_-`@space@
+^blank:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF~!@#$%^&*(){}[]':;"<>,./?\+=_-`@blank@
+^punct:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF Z@punct@
+^cntrl:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF~!@#$%^&*(){}[]':;"<>,./?\+=_-`@cntrl@
+^xdigit:ghijklmnopqrstuvwxyzGHIJKLMNOPQRSTUVWXYZ ~!@#$%^&*(){}[]':;"<>,./?\+=_-`@xdigit@
+a-d:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@a-d@
+l-xyz:abcdefghijklmnopqrstuvw@l-xyz@
+abcd-bc:aaaaddddaaaa@abcd-bc@
+abcde-b-c:aaaaddddeeee@abcde-b-c@
+^XY-^XYZ:ZZZZZZZZZZZ@^XY-^XYZ@
+a+d:abc0123xyz789@a+d@
+a-u+Q:abcQQQQxyz@a-u+Q@
+ia:AaAa@ia@
+iabc:ABCabcAbCaBc@iabc@
+ia-c:ABCabcAbCaBc@ia-c@
+check-a:a@
+dot-all-1:XXX junk
+ junk
+ junk
+ @dot-all-1@
+x1:abaabb@x1@
+x2:abaabb@x2@
diff --git a/tests/debug.txt b/tests/debug.txt
new file mode 100644
index 0000000..8d6476c
--- /dev/null
+++ b/tests/debug.txt
@@ -0,0 +1,2 @@
+Any input will do for this test.
+We are only testing if it actually runs in debug mode.
diff --git a/tests/extended.txt b/tests/extended.txt
new file mode 100644
index 0000000..829e23d
--- /dev/null
+++ b/tests/extended.txt
@@ -0,0 +1,2 @@
+abcdefghijklmnopqrstuvwxyz
+ABCD
diff --git a/tests/fixedtrailing.txt b/tests/fixedtrailing.txt
new file mode 100644
index 0000000..824a86d
--- /dev/null
+++ b/tests/fixedtrailing.txt
@@ -0,0 +1 @@
+fooaa
diff --git a/tests/flexname.txt b/tests/flexname.txt
new file mode 100644
index 0000000..257cc56
--- /dev/null
+++ b/tests/flexname.txt
@@ -0,0 +1 @@
+foo
diff --git a/tests/lexcompat.txt b/tests/lexcompat.txt
new file mode 100644
index 0000000..257cc56
--- /dev/null
+++ b/tests/lexcompat.txt
@@ -0,0 +1 @@
+foo
diff --git a/tests/lineno.txt b/tests/lineno.txt
new file mode 100644
index 0000000..c1eb961
--- /dev/null
+++ b/tests/lineno.txt
@@ -0,0 +1,19 @@
+These words
+are separated
+by newlines
+and sometimes
+ spaces
+too.
+The next three lines are numbers with only intervening newlines
+01123
+581321
+34
+And now for some blank lines....
+
+
+Finally, we directly modify yylineno, but then change it back afterwards
+(see scanner.l):
+
+yylineno++
+
+yylineno--
diff --git a/tests/posixlycorrect.txt b/tests/posixlycorrect.txt
new file mode 100644
index 0000000..753ff4f
--- /dev/null
+++ b/tests/posixlycorrect.txt
@@ -0,0 +1 @@
+ababab
diff --git a/tests/preposix.txt b/tests/preposix.txt
new file mode 100644
index 0000000..9abab54
--- /dev/null
+++ b/tests/preposix.txt
@@ -0,0 +1 @@
+abbb
diff --git a/tests/quoteincomment.txt b/tests/quoteincomment.txt
new file mode 100644
index 0000000..9daeafb
--- /dev/null
+++ b/tests/quoteincomment.txt
@@ -0,0 +1 @@
+test
diff --git a/tests/reject.txt b/tests/reject.txt
new file mode 100644
index 0000000..c28d22d
--- /dev/null
+++ b/tests/reject.txt
@@ -0,0 +1,3 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
+
diff --git a/tests/tableopts.txt b/tests/tableopts.txt
new file mode 100644
index 0000000..aec9276
--- /dev/null
+++ b/tests/tableopts.txt
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar foobar
+0000 foo 1111 foo 0000 bar foobar
diff --git a/tests/vartrailing.txt b/tests/vartrailing.txt
new file mode 100644
index 0000000..8eb09ff
--- /dev/null
+++ b/tests/vartrailing.txt
@@ -0,0 +1,15 @@
+We are testing rules with trailing contexts containing newlines (see scanner.l):
+
+Fixed_trailing:
+test
+
+Var_trailing:word
+test
+
+Var_prefix_and_trailing:word:
+more
+text
+comes
+here
+
+
diff --git a/tests/yyless.txt b/tests/yyless.txt
new file mode 100644
index 0000000..323fae0
--- /dev/null
+++ b/tests/yyless.txt
@@ -0,0 +1 @@
+foobar
diff --git a/tests/yymore.txt b/tests/yymore.txt
new file mode 100644
index 0000000..75fd4fe
--- /dev/null
+++ b/tests/yymore.txt
@@ -0,0 +1 @@
+^foobar
diff --git a/tests/yymorearray.txt b/tests/yymorearray.txt
new file mode 100644
index 0000000..323fae0
--- /dev/null
+++ b/tests/yymorearray.txt
@@ -0,0 +1 @@
+foobar
diff --git a/tests/yymorearraybol.txt b/tests/yymorearraybol.txt
new file mode 100644
index 0000000..323fae0
--- /dev/null
+++ b/tests/yymorearraybol.txt
@@ -0,0 +1 @@
+foobar
diff --git a/tests/yyunput.txt b/tests/yyunput.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/yyunput.txt