From 18a010c76044e83fd3bbb00bad2c3c32ace8eee5 Mon Sep 17 00:00:00 2001
From: j8takagi <j8takagi@nifty.com>
Date: Sat, 5 Mar 2011 13:03:43 +0900
Subject: [PATCH] =?utf8?q?=E3=82=B7=E3=82=B9=E3=83=86=E3=83=A0=E3=83=86?=
 =?utf8?q?=E3=82=B9=E3=83=88=E3=82=92=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

---
 test/system/casl2/Test.mk           | 2 +-
 test/system/comet2/Test.mk          | 2 +-
 test/system/comet2/opt_opterr/0.txt | 1 -
 test/system/comet2/opt_opterr/cmd   | 2 +-
 test/system/dumpword/Test.mk        | 2 +-
 5 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/test/system/casl2/Test.mk b/test/system/casl2/Test.mk
index 11d4065..ac0fbb7 100644
--- a/test/system/casl2/Test.mk
+++ b/test/system/casl2/Test.mk
@@ -49,7 +49,7 @@ define exec_cmd
     if test ! -x $1; then $(CHMOD) u+x $1; fi
     ./$1 >>$2 2>$3
     if test -s $3; then $(CAT) $3 >>$2; fi
-    $(SED) -i '' -e "s%$(CURRDIR)%\$$PWD%g" $2
+    $(CP) $2 $2.tmp && $(SED) -e "s%$(CURRDIR)%\$$PWD%g" $2.tmp >$2 && $(RM) $2.tmp
     $(call rm_null,$3)
 endef
 
diff --git a/test/system/comet2/Test.mk b/test/system/comet2/Test.mk
index 11d4065..ac0fbb7 100644
--- a/test/system/comet2/Test.mk
+++ b/test/system/comet2/Test.mk
@@ -49,7 +49,7 @@ define exec_cmd
     if test ! -x $1; then $(CHMOD) u+x $1; fi
     ./$1 >>$2 2>$3
     if test -s $3; then $(CAT) $3 >>$2; fi
-    $(SED) -i '' -e "s%$(CURRDIR)%\$$PWD%g" $2
+    $(CP) $2 $2.tmp && $(SED) -e "s%$(CURRDIR)%\$$PWD%g" $2.tmp >$2 && $(RM) $2.tmp
     $(call rm_null,$3)
 endef
 
diff --git a/test/system/comet2/opt_opterr/0.txt b/test/system/comet2/opt_opterr/0.txt
index 68ca826..b4b0041 100644
--- a/test/system/comet2/opt_opterr/0.txt
+++ b/test/system/comet2/opt_opterr/0.txt
@@ -1,2 +1 @@
-comet2: invalid option -- z
 Usage: ../../../../comet2 [-tTdh] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE
diff --git a/test/system/comet2/opt_opterr/cmd b/test/system/comet2/opt_opterr/cmd
index 6b9a889..4ba1f06 100755
--- a/test/system/comet2/opt_opterr/cmd
+++ b/test/system/comet2/opt_opterr/cmd
@@ -1,3 +1,3 @@
 ../../../../casl2 -O ../../../../as/sum_10.casl
-../../../../comet2 -z a.o 2>&1
+../../../../comet2 -z a.o 2>&1 | tail -1 1>&2
 rm -f a.o
diff --git a/test/system/dumpword/Test.mk b/test/system/dumpword/Test.mk
index 11d4065..ac0fbb7 100644
--- a/test/system/dumpword/Test.mk
+++ b/test/system/dumpword/Test.mk
@@ -49,7 +49,7 @@ define exec_cmd
     if test ! -x $1; then $(CHMOD) u+x $1; fi
     ./$1 >>$2 2>$3
     if test -s $3; then $(CAT) $3 >>$2; fi
-    $(SED) -i '' -e "s%$(CURRDIR)%\$$PWD%g" $2
+    $(CP) $2 $2.tmp && $(SED) -e "s%$(CURRDIR)%\$$PWD%g" $2.tmp >$2 && $(RM) $2.tmp
     $(call rm_null,$3)
 endef
 
-- 
2.18.0