テストがMacやCygwinなどでも成功するように変更
authorj8takagi <j8takagi@nifty.com>
Wed, 24 Mar 2010 15:25:18 +0000 (00:25 +0900)
committerj8takagi <j8takagi@nifty.com>
Wed, 24 Mar 2010 16:35:07 +0000 (01:35 +0900)
test/integration/casl2/TEST.mk
test/integration/casl2/TEST_O.mk
test/integration/casl2/err_126/0.txt [new file with mode: 0644]
test/integration/casl2/err_126/Makefile [new file with mode: 0644]
test/integration/casl2/opt_opterr/0.txt
test/integration/casl2/opt_opterr/Makefile

index 13e4f02..ed67014 100644 (file)
@@ -14,7 +14,7 @@ clean:
        @rm -f 1.txt diff.txt report.txt err.txt
 cleanall: clean
        @rm -f 0.txt
-0.txt 1.txt: $(CASL2) $(ASFILE)
+0.txt 1.txt:: $(CASL2) $(ASFILE)
        @echo $(CMD) >$@; \
      $(CMD) >>$@ 2>$(ERRFILE); \
      if test -s $(ERRFILE); then cat err.txt >>$@; else rm -f $(ERRFILE); fi
index 2d16d49..b448d40 100644 (file)
@@ -25,7 +25,7 @@ cleanall: clean
      $(OD)  >>$@ 2>>$(ERRFILE); \
      if test -s $(ERRFILE); then cat err.txt >>$@; else rm -f $(ERRFILE); fi
 diff.txt: 1.txt
-       @-diff 0.txt 1.txt >$@ 2>&1
+       @-diff -b 0.txt 1.txt >$@ 2>&1
 report.txt: diff.txt
        @echo -n "$(UNITNAME): Test " >$@; \
      if test ! -s $^; then echo -n "Success " >>$@; rm -f $^; else echo -n "Failure " >>$@; fi; \
diff --git a/test/integration/casl2/err_126/0.txt b/test/integration/casl2/err_126/0.txt
new file mode 100644 (file)
index 0000000..667a371
--- /dev/null
@@ -0,0 +1,2 @@
+../../../../casl2
+CASL2 error - 126: no source file
diff --git a/test/integration/casl2/err_126/Makefile b/test/integration/casl2/err_126/Makefile
new file mode 100644 (file)
index 0000000..43e8194
--- /dev/null
@@ -0,0 +1,3 @@
+include ../CMD.mk    # YACASL2DIR, CASL2
+CMD = $(CASL2)
+include ../TEST.mk
index 890f3b0..335b97e 100644 (file)
@@ -1,3 +1 @@
-../../../../casl2 -z ../../../../as/sum_10.casl
-../../../../casl2: invalid option -- z
-Usage: ../../../../casl2 [-slLaAtTdh] [-oO<OBJECTFILE>] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE ...
+Usage: ../../../../casl2 [-slLaAtTdh] [-oO[<OBJECTFILE>]] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE1[ FILE2  ...]
index 76a17fb..5d0a565 100644 (file)
@@ -4,3 +4,5 @@ include ../opt_s/CMD.mk         # ASDIR, ASFILE
 CASL2FLAG = -z
 CMD = $(CASL2) $(CASL2FLAG) $(ASFILE)
 include ../TEST.mk
+0.txt 1.txt:: $(CASL2) $(ASFILE)
+       @if test -s $(ERRFILE); then tail -1 err.txt >$@; else rm -f $(ERRFILE); fi