diff --git a/tests/testdataducktype.in b/tests/testdataducktype.in new file mode 100644 index 0000000..b85905e --- /dev/null +++ b/tests/testdataducktype.in @@ -0,0 +1 @@ +1 2 3 diff --git a/tests/testdatafloatprec.in b/tests/testdatafloatprec.in new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/testdatafloatprec.in @@ -0,0 +1 @@ +1 diff --git a/tests/testdataloopvar.in b/tests/testdataloopvar.in new file mode 100644 index 0000000..6e8183b --- /dev/null +++ b/tests/testdataloopvar.in @@ -0,0 +1 @@ +0 1 diff --git a/tests/testdatarecharclass.in b/tests/testdatarecharclass.in new file mode 100644 index 0000000..7cbf637 --- /dev/null +++ b/tests/testdatarecharclass.in @@ -0,0 +1,2 @@ +9 + 040abcdefghiz diff --git a/tests/testdatarerepetitions.in b/tests/testdatarerepetitions.in new file mode 100644 index 0000000..ee21405 --- /dev/null +++ b/tests/testdatarerepetitions.in @@ -0,0 +1 @@ +abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqr diff --git a/tests/testdatarescape.in b/tests/testdatarescape.in new file mode 100644 index 0000000..56ce902 --- /dev/null +++ b/tests/testdatarescape.in @@ -0,0 +1 @@ +(((. diff --git a/tests/testdatastrcmp.in b/tests/testdatastrcmp.in new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/testdatastrcmp.in @@ -0,0 +1 @@ +1 diff --git a/tests/testprogducktype.in b/tests/testprogducktype.in new file mode 100644 index 0000000..ea9d483 --- /dev/null +++ b/tests/testprogducktype.in @@ -0,0 +1,7 @@ +SET(n = 3) +SET(a = 0) # a is 0 +REPI(i, n, SPACE) + INT(1, 10, a[i]) # no, changed my mind, a is an array +END +NEWLINE +ASSERT(UNIQUE(a)) diff --git a/tests/testprogfloatprec.in b/tests/testprogfloatprec.in new file mode 100644 index 0000000..a184ddb --- /dev/null +++ b/tests/testprogfloatprec.in @@ -0,0 +1,8 @@ +INT(1, 100) NEWLINE + +SET(q=0.004) +SET(p=0) +REP(250) + SET(p = p+q) +END +ASSERT(p <= 1.0) diff --git a/tests/testprogloopvar.in b/tests/testprogloopvar.in new file mode 100644 index 0000000..e0d5f0d --- /dev/null +++ b/tests/testprogloopvar.in @@ -0,0 +1,6 @@ +# Read at least 2 bits (space-separated) +WHILEI(i,!MATCH("\n"), SPACE) + INT(0,1) +END +ASSERT(i>=2) +NEWLINE diff --git a/tests/testprogrecharclass.in b/tests/testprogrecharclass.in new file mode 100644 index 0000000..47fb16c --- /dev/null +++ b/tests/testprogrecharclass.in @@ -0,0 +1 @@ +REGEX("\d\s{3}\d{3}\w{10}") NEWLINE diff --git a/tests/testprogrerepetitions.in b/tests/testprogrerepetitions.in new file mode 100644 index 0000000..289f1eb --- /dev/null +++ b/tests/testprogrerepetitions.in @@ -0,0 +1,2 @@ +# Check regex repetitions +REGEX("[a-z]{1,1500}") NEWLINE diff --git a/tests/testprogrescape.in b/tests/testprogrescape.in new file mode 100644 index 0000000..4422ccf --- /dev/null +++ b/tests/testprogrescape.in @@ -0,0 +1,2 @@ +# Tests regexes with escaped symbols +REGEX("\({1,5}\.{1,5}") NEWLINE diff --git a/tests/testprogstrcmp.in b/tests/testprogstrcmp.in new file mode 100644 index 0000000..354950f --- /dev/null +++ b/tests/testprogstrcmp.in @@ -0,0 +1,7 @@ +# String comparisons +STRING("1") NEWLINE +SET(x = "abc") +SET(y = "hello") +ASSERT(x < "b") +ASSERT(y >= "helln") +ASSERT(x != y)