]> thyrsus.com Git - intercal.git/commitdiff
New test "ignorearray", for the IGNORE/array interaction
authorAlex Smith <ais523@bham.ac.uk>
Sun, 5 Sep 2010 04:45:36 +0000 (05:45 +0100)
committerAlex Smith <ais523@bham.ac.uk>
Sun, 5 Sep 2010 04:45:36 +0000 (05:45 +0100)
This one's needed because it catches potential issues with attempting
to pass booleans to a varargs function, at least with the current code.

pit/CATALOG
pit/Makefile
pit/tests/ignorearray.chk [new file with mode: 0644]
pit/tests/ignorearray.i [new file with mode: 0644]

index f0c4857c78238398fda3a5096a19afd17999e766..a01b1b461d2b832b81ce11272c6e31e536d59470 100644 (file)
@@ -138,6 +138,7 @@ by Alex Smith
   tests/permute.doc    Information about the permutation-printer
   tests/whileadd.i     + Adds two input numbers with a single WHILE statement
   tests/ignorret.i     + Testing interactions of IGNORE and RETRIEVE
+  tests/ignorearray.i   + Checking that IGNORE works correctly on arrays
   tests/ignorret.doc   What ignorret does on several compilers
   tests/normaldist.i   Checking the standard deviation of (1910)
   tests/testcreate.i   + A test for the CREATE statement
index 01f25a14c5f2fcef1aa3dc9800b4a7c5250fc105..d15c227d80f567981a925244f2d78f866f228a9c 100644 (file)
@@ -44,7 +44,8 @@ BASE2SOURCES = \
        $(PIT)/tests/ais2.i \
        $(PIT)/tests/compucome.i \
        $(PIT)/tests/hello.i \
-       $(PIT)/tests/ignorret \
+       $(PIT)/tests/ignorret.i \
+       $(PIT)/tests/ignorearray.i \
        $(PIT)/tests/iogerunds.i \
        $(PIT)/tests/limits.i \
        $(PIT)/tests/permute.i \
@@ -57,7 +58,7 @@ BASE2SOURCES = \
        $(PIT)/tests/testcf.i \
        $(PIT)/tests/testcreate .i \
        $(PIT)/tests/testlib2.i \
-       $(PIT)/tests/testonce \
+       $(PIT)/tests/testonce.i \
        $(PIT)/tests/testsplat.i \
        $(PIT)/tests/whileadd.i \
        $(PIT)/tpk.i \
@@ -124,6 +125,7 @@ test: $(TARGETS)
        @cat $(PIT)/tests/ais2.tst | $(PIT)/tests/ais2 | $(PIT)/regresscheck $(PIT)/tests/ais2 
        @$(PIT)/tests/count | $(PIT)/regresscheck $(PIT)/tests/count 
        @$(PIT)/tests/hello | $(PIT)/regresscheck $(PIT)/tests/hello 
+       @$(PIT)/tests/ignorearray | $(PIT)/regresscheck $(PIT)/tests/ignorearray
        @$(PIT)/tests/ignorret | $(PIT)/regresscheck $(PIT)/tests/ignorret 
        @$(PIT)/tests/permute | $(PIT)/regresscheck $(PIT)/tests/permute 
        @$(PIT)/tests/sink 2>&1 | $(PIT)/regresscheck $(PIT)/tests/sink
diff --git a/pit/tests/ignorearray.chk b/pit/tests/ignorearray.chk
new file mode 100644 (file)
index 0000000..c16360e
--- /dev/null
@@ -0,0 +1,12 @@
+ 
+I
+  
+II
+   
+III
+ 
+I
+ 
+V
+   
+III
diff --git a/pit/tests/ignorearray.i b/pit/tests/ignorearray.i
new file mode 100644 (file)
index 0000000..7275e98
--- /dev/null
@@ -0,0 +1,14 @@
+        DO ;1 <- #3
+        PLEASE DO ;1 SUB #1 <- #1
+        DO ;1 SUB #2 <- #2
+        DO ;1 SUB #3 <- #3
+        PLEASE DO READ OUT ;1 SUB #1 + ;1 SUB #2 + ;1 SUB #3
+        DO IGNORE ;1
+        DO ;1 SUB #1 <- #4
+        DO REMEMBER ;1
+        DO ;1 SUB #2 <- #5
+        DO IGNORE ;1
+        DO ;1 SUB #3 <- #6
+        DO READ OUT ;1 SUB #1 + ;1 SUB #2 + ;1 SUB #3
+        PLEASE GIVE UP
+