head 1.26; access; symbols SHTOOL_2_0_8:1.26 SHTOOL_2_0_7:1.25 SHTOOL_2_0_6:1.24 SHTOOL_2_0_5:1.24 SHTOOL_2_0_4:1.24 SHTOOL_2_0_3:1.23 SHTOOL_2_0_2:1.23 SHTOOL_2_0_1:1.22 SHTOOL_2_0_0:1.22 SHTOOL_2_0b3:1.22 SHTOOL_2_0b2:1.22 SHTOOL_2_0b1:1.22 SHTOOL_1_6:1.19.0.2 SHTOOL_1_6_2:1.19 SHTOOL_1_6_1:1.19 SHTOOL_1_6_0:1.19 SHTOOL_1_5:1.16.0.2 SHTOOL_1_5_4:1.16 SHTOOL_1_5_3:1.15 SHTOOL_1_5_2:1.15 SHTOOL_1_5_1:1.14 SHTOOL_1_5_0:1.14 SHTOOL_1_4_9:1.12 SHTOOL_1_4_8:1.12 SHTOOL_1_4_7:1.11 SHTOOL_1_4_6:1.11 SHTOOL_1_4_5:1.11 SHTOOL_1_4_4:1.11 SHTOOL_1_4_3:1.10 SHTOOL_1_4_2:1.10 SHTOOL_1_4_1:1.10 SHTOOL_1_4_0:1.10; locks; strict; comment @# @; 1.26 date 2008.04.02.20.13.44; author rse; state Exp; branches; next 1.25; commitid eB5Wirx8MdMyDzXs; 1.25 date 2007.05.19.19.09.39; author rse; state Exp; branches; next 1.24; commitid OPUF1UBbllBTwzis; 1.24 date 2006.02.04.09.43.26; author rse; state Exp; branches; next 1.23; commitid oWk7BmnyAitJtfkr; 1.23 date 2005.06.15.08.14.36; author rse; state Exp; branches; next 1.22; 1.22 date 2004.01.01.16.54.20; author rse; state Exp; branches; next 1.21; 1.21 date 2003.12.13.21.23.55; author rse; state Exp; branches; next 1.20; 1.20 date 2003.02.11.13.00.50; author rse; state Exp; branches; next 1.19; 1.19 date 2001.12.31.15.06.04; author rse; state Exp; branches; next 1.18; 1.18 date 2001.09.23.11.15.57; author rse; state Exp; branches; next 1.17; 1.17 date 2001.06.14.21.27.14; author rse; state Exp; branches; next 1.16; 1.16 date 2001.04.20.19.00.02; author rse; state Exp; branches; next 1.15; 1.15 date 2001.01.17.09.55.11; author rse; state Exp; branches; next 1.14; 1.14 date 2000.07.01.12.13.38; author rse; state Exp; branches; next 1.13; 1.13 date 2000.06.30.16.39.07; author rse; state Exp; branches; next 1.12; 1.12 date 2000.03.12.11.12.21; author rse; state Exp; branches; next 1.11; 1.11 date 99.07.17.14.28.41; author rse; state Exp; branches; next 1.10; 1.10 date 99.07.02.08.41.22; author rse; state Exp; branches; next 1.9; 1.9 date 99.07.02.08.34.33; author rse; state Exp; branches; next 1.8; 1.8 date 99.07.02.08.24.07; author rse; state Exp; branches; next 1.7; 1.7 date 99.07.02.08.04.03; author rse; state Exp; branches; next 1.6; 1.6 date 99.07.02.08.02.56; author rse; state Exp; branches; next 1.5; 1.5 date 99.07.02.08.00.12; author rse; state Exp; branches; next 1.4; 1.4 date 99.07.02.07.54.39; author rse; state Exp; branches; next 1.3; 1.3 date 99.07.02.07.46.29; author rse; state Exp; branches; next 1.2; 1.2 date 99.07.02.07.29.57; author rse; state Exp; branches; next 1.1; 1.1 date 99.07.02.07.24.26; author rse; state Exp; branches; next ; desc @@ 1.26 log @adjust copyright for year 2008 @ text @## ## test.db -- GNU shtool test suite (minimalistic) ## Copyright (c) 1999-2008 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{rotate} echo foo >foo shtool rotate -n2 foo shtool rotate -n2 foo shtool rotate -n2 foo @@end{rotate} @@begin{tarball} # cannot be checked easily, so just start it shtool tarball -o test . @@end{tarball} @@begin{subst} echo fooAfoo >foo echo barBbar >bar echo bazCbaz >baz shtool subst \ -e 's;^\(...\)\([A-Z]\)\(.*\)$;\1\2\3\2;' \ -e 's;^...;;' -b.original foo bar baz test -f foo.original test -f bar.original test -f baz.original test ".`cat foo.original`" = ".fooAfoo" test ".`cat bar.original`" = ".barBbar" test ".`cat baz.original`" = ".bazCbaz" test -f foo test -f bar test -f baz test ".`cat foo`" = ".AfooA" test ".`cat bar`" = ".BbarB" test ".`cat baz`" = ".CbazC" @@end{subst} @@begin{platform} # cannot be checked easily, so just start it shtool platform @@end{platform} @@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" @@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 '#!/bin/sh' >foo.sh echo 'true' >>foo.sh chmod a+x foo.sh test "x`shtool path -p $PATH:. foo.sh`" = "x./foo.sh" @@end{path} @ 1.25 log @Adjust copyright for year 2007. @ text @d3 1 a3 1 ## Copyright (c) 1999-2007 Ralf S. Engelschall @ 1.24 log @Adjust copyright for year 2006 @ text @d3 1 a3 1 ## Copyright (c) 1999-2006 Ralf S. Engelschall @ 1.23 log @Adjust copyright for year 2005 @ text @d3 1 a3 1 ## Copyright (c) 1999-2005 Ralf S. Engelschall @ 1.22 log @Bump copyright year for 2004 @ text @d3 1 a3 1 ## Copyright (c) 1999-2004 Ralf S. Engelschall @ 1.21 log @Replaced old and inflexible "shtool guessos" command with a completely new command "shtool platform" command. It distinguishes a Unix platform according to its hardware architecture and operating system. For both there is a class, product and technology identification. For each of those six identifications, there is a verbose, regular and concise version. @ text @d3 1 a3 1 ## Copyright (c) 1999-2003 Ralf S. Engelschall @ 1.20 log @Bump year in copyright messages to cover new year 2003. @ text @d133 1 a133 1 @@begin{guessos} d135 2 a136 2 shtool guessos @@end{guessos} @ 1.19 log @bump copyright years @ text @d3 1 a3 1 ## Copyright (c) 1999-2002 Ralf S. Engelschall @ 1.18 log @*** empty log message *** @ text @d3 1 a3 1 ## Copyright (c) 1999-2001 Ralf S. Engelschall @ 1.17 log @*** empty log message *** @ text @d100 7 @ 1.16 log @*** empty log message *** @ text @d105 21 @ 1.15 log @*** empty log message *** @ text @d186 2 a187 1 echo foo >foo.sh @ 1.14 log @*** empty log message *** @ text @d3 1 a3 1 ## Copyright (c) 1999-2000 Ralf S. Engelschall @ 1.13 log @*** empty log message *** @ text @a176 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" @ 1.12 log @*** empty log message *** @ text @d167 1 a167 1 shtool version -ltxt -iP version.txt d169 12 @ 1.11 log @*** empty log message *** @ text @d3 1 a3 1 ## Copyright (c) 1999 Ralf S. Engelschall @ 1.10 log @*** empty log message *** @ text @d100 5 @ 1.9 log @*** empty log message *** @ text @d160 4 d167 9 @ 1.8 log @*** empty log message *** @ text @d124 2 d129 28 @ 1.7 log @*** empty log message *** @ text @d106 15 @ 1.6 log @*** empty log message *** @ text @d93 5 d101 2 @ 1.5 log @*** empty log message *** @ text @d79 11 @ 1.4 log @*** empty log message *** @ text @d27 2 d56 6 d65 11 @ 1.3 log @*** empty log message *** @ text @d15 2 d20 4 @ 1.2 log @*** empty log message *** @ text @d2 1 a2 1 ## test.db -- GNU shtool test suite d7 5 @ 1.1 log @*** empty log message *** @ text @d2 1 a2 1 ## test.db -- GNU shtool regression tests d6 12 d41 30 @