ref: ac7c8364ea8f5992e6e56d6f0073869bcf64bb0d
parent: e87ff91fdaa4b98530a7048ae460912647d95bd8
author: Michael Forney <mforney@mforney.org>
date: Tue Mar 8 11:55:27 EST 2022
cpp: remove line directives from expected output These paths contain the full path of the regress directory, which will vary depending on where it is checked out. The line directives are not under test, so pass -P to cpp to skip them.
--- a/cmd/cpp/cat.test.expected
+++ b/cmd/cpp/cat.test.expected
@@ -1,4 +1,3 @@
-#line 1 "/usr/ori/src/regress/cmd/cpp/cat.test"
--- a/cmd/cpp/cpp.rc
+++ b/cmd/cpp/cpp.rc
@@ -1,7 +1,7 @@
#!/bin/rc
for(f in *.test){
- cpp $f > $f.out
+ cpp -P $f > $f.out
if(! cmp $f.out $f.expected){
>[2=1] echo fail: $f
>[2=1] ape/diff $f.out $f.expected
--- a/cmd/cpp/cycle.test.expected
+++ b/cmd/cpp/cycle.test.expected
@@ -1,4 +1,3 @@
-#line 1 "/usr/ori/src/regress/cmd/cpp/cycle.test"
A
--- a/cmd/cpp/ncat.test.expected
+++ b/cmd/cpp/ncat.test.expected
@@ -1,4 +1,3 @@
-#line 1 "/usr/ori/src/regress/cmd/cpp/ncat.test"
foobar
--- a/cmd/cpp/smoke.test.expected
+++ b/cmd/cpp/smoke.test.expected
@@ -1,6 +1,4 @@
-#line 1 "/usr/ori/src/regress/cmd/cpp/smoke.test"
-#line 9 "/usr/ori/src/regress/cmd/cpp/smoke.test"
@@ -23,6 +21,4 @@
f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
f(2 * (2 +(3,4)- 0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^ m(0,1);
-#line 32 "/usr/ori/src/regress/cmd/cpp/smoke.test"
-#line 39 "/usr/ori/src/regress/cmd/cpp/smoke.test"