summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-04-12 06:30:41 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-04-12 06:30:41 -0700
commit5928aec8aa7057aeab14c4cb5f29230fe062c62f (patch)
treef8c25e6aaef5ab4449ba379059074f1f97d62275
parent5e1d3f20ee2c3864e567eb478b248c3cc747803a (diff)
downloadtxr-5928aec8aa7057aeab14c4cb5f29230fe062c62f.tar.gz
txr-5928aec8aa7057aeab14c4cb5f29230fe062c62f.tar.bz2
txr-5928aec8aa7057aeab14c4cb5f29230fe062c62f.zip
tests: implicitly generate empty .expected files.
Makefile (%.expected): New implicit rule. Whenever a test requires a .expected file, if it is missing, we create an empty one. This file will be treated as an intermediate by GNU Make, which means that it will be deleted when make terminates. * tests/012/compile.tl: Some of the .tl files no longer have an .expected file, so we have to test for that in the catenating logic. * tests/008/call-2.expected, * tests/008/no-stdin-hang.expected, * tests/011/macros-3.expected, * tests/011/patmatch.expected, * tests/012/aseq.expected, * tests/012/ashwin.expected, * tests/012/compile.tl, * tests/012/cont.expected, * tests/012/defset.expected, * tests/012/ifa.expected, * tests/012/oop-seq.expected, * tests/012/parse.expected, * tests/012/quasi.expected, * tests/012/quine.expected, * tests/012/seq.expected, * tests/012/struct.expected, * tests/012/stslot.expected, * tests/014/dgram-stream.expected, * tests/014/in6addr-str.expected, * tests/014/inaddr-str.expected, * tests/014/socket-basic.expected, * tests/015/awk-fconv.expected, * tests/015/split.expected, * tests/015/trim.expected, * tests/016/arith.expected, * tests/016/ud-arith.expected, * tests/017/ffi-misc.expected, * tests/018/chmod.expected: Empty file deleted.
-rw-r--r--Makefile3
-rw-r--r--tests/008/call-2.expected0
-rw-r--r--tests/008/no-stdin-hang.expected0
-rw-r--r--tests/011/macros-3.expected0
-rw-r--r--tests/011/patmatch.expected0
-rw-r--r--tests/012/aseq.expected0
-rw-r--r--tests/012/ashwin.expected0
-rw-r--r--tests/012/compile.tl6
-rw-r--r--tests/012/cont.expected0
-rw-r--r--tests/012/defset.expected0
-rw-r--r--tests/012/ifa.expected0
-rw-r--r--tests/012/oop-seq.expected0
-rw-r--r--tests/012/parse.expected0
-rw-r--r--tests/012/quasi.expected0
-rw-r--r--tests/012/quine.expected0
-rw-r--r--tests/012/seq.expected0
-rw-r--r--tests/012/struct.expected0
-rw-r--r--tests/012/stslot.expected0
-rw-r--r--tests/014/dgram-stream.expected0
-rw-r--r--tests/014/in6addr-str.expected0
-rw-r--r--tests/014/inaddr-str.expected0
-rw-r--r--tests/014/socket-basic.expected0
-rw-r--r--tests/015/awk-fconv.expected0
-rw-r--r--tests/015/split.expected0
-rw-r--r--tests/015/trim.expected0
-rw-r--r--tests/016/arith.expected0
-rw-r--r--tests/016/ud-arith.expected0
-rw-r--r--tests/017/ffi-misc.expected0
-rw-r--r--tests/018/chmod.expected0
29 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index fe007c88..f23f25c0 100644
--- a/Makefile
+++ b/Makefile
@@ -368,6 +368,9 @@ retest:
$(V)rm -rf tst
$(V)$(MAKE) tests
+%.expected:
+ $(V)touch $@
+
tst/tests/000/binding.ok: TXR_OPTS := -B
tst/tests/001/%: TXR_ARGS := tests/001/data
tst/tests/001/query-1.ok: TXR_OPTS := -B
diff --git a/tests/008/call-2.expected b/tests/008/call-2.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/008/call-2.expected
+++ /dev/null
diff --git a/tests/008/no-stdin-hang.expected b/tests/008/no-stdin-hang.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/008/no-stdin-hang.expected
+++ /dev/null
diff --git a/tests/011/macros-3.expected b/tests/011/macros-3.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/011/macros-3.expected
+++ /dev/null
diff --git a/tests/011/patmatch.expected b/tests/011/patmatch.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/011/patmatch.expected
+++ /dev/null
diff --git a/tests/012/aseq.expected b/tests/012/aseq.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/aseq.expected
+++ /dev/null
diff --git a/tests/012/ashwin.expected b/tests/012/ashwin.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/ashwin.expected
+++ /dev/null
diff --git a/tests/012/compile.tl b/tests/012/compile.tl
index 36a285d3..f5b260cf 100644
--- a/tests/012/compile.tl
+++ b/tests/012/compile.tl
@@ -6,7 +6,9 @@
(each ((f '#"aseq.tl ashwin.tl circ.tl cont.tl defset.tl except.tl \
fini.tl ifa.tl man-or-boy.tl oop-mi.tl oop-seq.tl oop.tl \
parse.tl quasi.tl quine.tl seq.tl stslot.tl"))
- (file-append-string %expected-file%
- (file-get-string `@{%this-dir%}/@(m^ #/.*[.]/ f)expected`))
+ (let ((exf `@{%this-dir%}/@(m^ #/.*[.]/ f)expected`))
+ (when (path-exists-p exf)
+ (file-append-string %expected-file%
+ (file-get-string exf))))
(compile-file f "temp.tlo")
(remove-path "temp.tlo"))
diff --git a/tests/012/cont.expected b/tests/012/cont.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/cont.expected
+++ /dev/null
diff --git a/tests/012/defset.expected b/tests/012/defset.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/defset.expected
+++ /dev/null
diff --git a/tests/012/ifa.expected b/tests/012/ifa.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/ifa.expected
+++ /dev/null
diff --git a/tests/012/oop-seq.expected b/tests/012/oop-seq.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/oop-seq.expected
+++ /dev/null
diff --git a/tests/012/parse.expected b/tests/012/parse.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/parse.expected
+++ /dev/null
diff --git a/tests/012/quasi.expected b/tests/012/quasi.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/quasi.expected
+++ /dev/null
diff --git a/tests/012/quine.expected b/tests/012/quine.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/quine.expected
+++ /dev/null
diff --git a/tests/012/seq.expected b/tests/012/seq.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/seq.expected
+++ /dev/null
diff --git a/tests/012/struct.expected b/tests/012/struct.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/struct.expected
+++ /dev/null
diff --git a/tests/012/stslot.expected b/tests/012/stslot.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/012/stslot.expected
+++ /dev/null
diff --git a/tests/014/dgram-stream.expected b/tests/014/dgram-stream.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/014/dgram-stream.expected
+++ /dev/null
diff --git a/tests/014/in6addr-str.expected b/tests/014/in6addr-str.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/014/in6addr-str.expected
+++ /dev/null
diff --git a/tests/014/inaddr-str.expected b/tests/014/inaddr-str.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/014/inaddr-str.expected
+++ /dev/null
diff --git a/tests/014/socket-basic.expected b/tests/014/socket-basic.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/014/socket-basic.expected
+++ /dev/null
diff --git a/tests/015/awk-fconv.expected b/tests/015/awk-fconv.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/015/awk-fconv.expected
+++ /dev/null
diff --git a/tests/015/split.expected b/tests/015/split.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/015/split.expected
+++ /dev/null
diff --git a/tests/015/trim.expected b/tests/015/trim.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/015/trim.expected
+++ /dev/null
diff --git a/tests/016/arith.expected b/tests/016/arith.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/016/arith.expected
+++ /dev/null
diff --git a/tests/016/ud-arith.expected b/tests/016/ud-arith.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/016/ud-arith.expected
+++ /dev/null
diff --git a/tests/017/ffi-misc.expected b/tests/017/ffi-misc.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/017/ffi-misc.expected
+++ /dev/null
diff --git a/tests/018/chmod.expected b/tests/018/chmod.expected
deleted file mode 100644
index e69de29b..00000000
--- a/tests/018/chmod.expected
+++ /dev/null