Index: ossp-pkg/shtool/sh.path RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.path,v rcsdiff -q -kk '-r1.15' '-r1.16' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.path,v' 2>/dev/null --- sh.path 2000/06/30 16:25:34 1.15 +++ sh.path 2000/06/30 16:39:07 1.16 @@ -110,10 +110,8 @@ # MAGIC SITUATION # C pre-processor (cpp) if [ ".$opt_m" = .yes ] && [ ".$namelist" = .cpp ]; then - cat >$tmpfile.c <<'EOT' -#include -Syntax Error -EOT + echo >$tmpfile.c "#include " + echo >>$tmpfile.c "Syntax Error" # 1. try the standard cc -E approach cpp="${CC-cc} -E" (eval "$cpp $tmpfile.c >/dev/null") 2>$tmpfile.out Index: ossp-pkg/shtool/test.db RCS File: /v/ossp/cvs/ossp-pkg/shtool/test.db,v co -q -kk -p'1.13' '/v/ossp/cvs/ossp-pkg/shtool/test.db,v' | diff -u /dev/null - -L'ossp-pkg/shtool/test.db' 2>/dev/null --- ossp-pkg/shtool/test.db +++ - 2026-06-14 23:57:37.979672735 +0200 @@ -0,0 +1,194 @@ +## +## test.db -- GNU shtool test suite (minimalistic) +## Copyright (c) 1999-2000 Ralf S. Engelschall +## + +@begin{echo} +test ".`shtool echo foo bar quux`" = ".foo bar quux" +bytes=`shtool echo -n foo | wc -c | awk '{ printf("%s", $1); }'` +test ".$bytes" = .3 +bytes=`shtool echo '\1' | wc -c | awk '{ printf("%s", $1); }'` +test ".$bytes" = .3 +@end{echo} + +@begin{mdate} +# cannot be checked easily, so just start it +shtool mdate / +@end{mdate} + +@begin{table} +echo "foo bar " >tab1 +echo "baz quux " >>tab1 +shtool table -F: -c2 -w5 "foo:bar:baz:quux" >tab2 +cmp tab1 tab2 +@end{table} + +@begin{prop} +# cannot be checked easily, so just start it +(echo 1; echo 2; echo 3) | shtool prop -p foo +@end{prop} + +@begin{move} +echo foo >bar +shtool move bar quux +test ! -f bar +test -f quux +test ".`cat quux`" = .foo +@end{move} + +@begin{install} +echo foo >bar +shtool install -m 644 -c bar quux +test -f bar +test -f quux +test ".`cat quux`" = .foo +shtool install -C bar quux +test -f bar +test -f quux +test ".`cat quux`" = .foo +shtool install bar quux +test ! -f bar +test -f quux +test ".`cat quux`" = .foo +@end{install} + +@begin{mkdir} +shtool mkdir a +test -d a +shtool mkdir a/b +test -d a/b +shtool mkdir -p c/d/e/f/g +test -d c/d/e/f/g +@end{mkdir} + +@begin{mkln} +mkdir a +mkdir a/b +echo "foo" >a/b/c +mkdir x +mkdir x/y +shtool mkln -s a/b x/y +test -r x/y/b/c +rm x/y/b +shtool mkln -s a/b/c x/y/d +test -r x/y/d +test ".`cat x/y/d`" = .foo +@end{mkln} + +@begin{mkshadow} +mkdir a +mkdir a/b +mkdir a/b/c +echo foo >a/b/c/d +echo bar >a/b/c/e +mkdir x +shtool mkshadow -a a x/y +test -r x/y/b/c/d +test -r x/y/b/c/e +test ".`cat x/y/b/c/d`" = .foo +test ".`cat x/y/b/c/e`" = .bar +@end{mkshadow} + +@begin{fixperm} +# cannot be checked easily, so just start it +echo foo >a +echo bar >b +shtool fixperm * +shtool fixperm . +@end{fixperm} + +@begin{tarball} +# cannot be checked easily, so just start it +shtool tarball -o test . +@end{tarball} + +@begin{guessos} +# cannot be checked easily, so just start it +shtool guessos +@end{guessos} + +@begin{arx} +echo foo >foo.o +echo bar >bar.o +shtool arx -t rc lib1.a foo.o bar.o +echo baz >baz.o +echo quux >quux.o +shtool arx rc lib2.a baz.o quux.o +shtool arx rc lib3.a lib1.a lib2.a +rm foo.o bar.o baz.o quux.o lib1.a lib2.a +shtool arx x lib3.a +test -f foo.o +test -f bar.o +test -f baz.o +test -f quux.o +test ! -f lib1.a +test ! -f lib2.a +@end{arx} + +@begin{slo} +# cannot be checked easily, so just start it +shtool slo -- -L. -lc +@end{slo} + +@begin{scpp} +echo "foo1" >foo.c +echo "#if foo" >>foo.c +echo "foo2" >>foo.c +echo "#endif /* foo */" >>foo.c +echo "foo3" >>foo.c +echo "void foo2a(void)" >>foo.c +echo "{" >>foo.c +echo "return;" >>foo.c +echo "}" >>foo.c +echo "intern void foo2b(void)" >>foo.c +echo "{" >>foo.c +echo "return;" >>foo.c +echo "}" >>foo.c +echo "void foo2c(void)" >>foo.c +echo "{" >>foo.c +echo "return;" >>foo.c +echo "}" >>foo.c +echo "foo5" >>foo.c +echo "bar1" >bar.h +echo "marker" >>bar.h +echo "bar2" >>bar.h +shtool scpp -Cintern -Mmarker -Dfoo -oquux.h -tbar.h foo.c +test ".`grep foo1 quux.h`" = . +test ".`grep foo2 quux.h`" != . +test ".`grep foo3 quux.h`" = . +test ".`grep __foo2a quux.h`" = . +test ".`grep __foo2b quux.h`" != . +test ".`grep __foo2c quux.h`" = . +@end{scpp} + +@begin{version} +shtool version -ltxt -s 1.2.3 version.txt +test ".`shtool version -ltxt -dshort version.txt`" = ".1.2.3" +shtool version -ltxt -il version.txt +test ".`shtool version -ltxt -dshort version.txt`" = ".1.2.4" +shtool version -ltxt -ir version.txt +test ".`shtool version -ltxt -dshort version.txt`" = ".1.3.0" +shtool version -ltxt -iv version.txt +test ".`shtool version -ltxt -dshort version.txt`" = ".2.0.0" +shtool version -lc -s 1.2.3 version.c +test ".`shtool version -ltxt -dshort version.c`" = ".1.2.3" +shtool version -lc -il version.c +test ".`shtool version -ltxt -dshort version.c`" = ".1.2.4" +shtool version -lc -ir version.c +test ".`shtool version -ltxt -dshort version.c`" = ".1.3.0" +shtool version -lc -iv version.c +test ".`shtool version -ltxt -dshort version.c`" = ".2.0.0" +@end{version} + +@begin{path} +shtool path -s ls +test $? -eq 0 +test "x`shtool path -r a/b/c`" = "x../../.." +test "x`shtool path -d a/b/c`" = "xa/b" +test "x`shtool path -d a/b/c/`" = "xa/b/c" +test "x`shtool path -b a/b/c`" = "xc" +echo foo >foo.sh +chmod a+x foo.sh +test "x`shtool path -p $PATH:. foo.sh`" = "x./foo.sh" +@end{path} +