From f9e27534c723ae199ed32404047b9a2c6519a8a9 Mon Sep 17 00:00:00 2001 From: j8takagi Date: Thu, 25 Mar 2010 23:54:24 +0900 Subject: [PATCH] =?utf8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=82=92=E3=80=81Mac?= =?utf8?q?=E3=82=84Cygwin=E3=81=A7=E3=82=82=E6=88=90=E5=8A=9F=E3=81=99?= =?utf8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- test/integration/casl2/TEST.mk | 9 +++++---- test/integration/casl2/opt_opterr/Makefile | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/test/integration/casl2/TEST.mk b/test/integration/casl2/TEST.mk index ed67014..c7add99 100644 --- a/test/integration/casl2/TEST.mk +++ b/test/integration/casl2/TEST.mk @@ -4,7 +4,6 @@ # make prepare : CMDで設定されたコマンドを実行した出力結果を0.txt(テストの想定結果)に出力 # make clean : 「make」で生成されたファイルをクリア # make cleanall: 「make」と「make clean」で生成されたファイルをクリア -ERRFILE = err.txt UNITNAME = `pwd | xargs basename` .PHPNY: check prepare clean cleanall @@ -14,10 +13,12 @@ clean: @rm -f 1.txt diff.txt report.txt err.txt cleanall: clean @rm -f 0.txt -0.txt 1.txt:: $(CASL2) $(ASFILE) +ifndef SETBYOTHER +0.txt 1.txt: $(CASL2) $(ASFILE) @echo $(CMD) >$@; \ - $(CMD) >>$@ 2>$(ERRFILE); \ - if test -s $(ERRFILE); then cat err.txt >>$@; else rm -f $(ERRFILE); fi + $(CMD) >>$@ 2>err.txt; \ + if test -s err.txt; then cat err.txt >>$@; else rm -f err.txt; fi +endif diff.txt: 1.txt @-diff -c 0.txt 1.txt >$@ 2>&1 report.txt: diff.txt diff --git a/test/integration/casl2/opt_opterr/Makefile b/test/integration/casl2/opt_opterr/Makefile index 5d0a565..87c8b6a 100644 --- a/test/integration/casl2/opt_opterr/Makefile +++ b/test/integration/casl2/opt_opterr/Makefile @@ -2,7 +2,9 @@ include ../CMD.mk # YACASL2DIR, CASL2 include ../opt_s/CMD.mk # ASDIR, ASFILE CASL2FLAG = -z +SETBYOTHER = 0 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 +0.txt 1.txt: $(CASL2) $(ASFILE) + @$(CMD) >>$@ 2>err.txt; \ + if test -s err.txt; then tail -1 err.txt >>$@; else rm -f err.txt; fi -- 2.18.0