10/29/89

The files in this directory are intended to exercise most parts of PMake.
In most cases, pmake should not abort nor should the creation of any target
stop before its shell script is complete. In cases where this is expected to
happen, a message is printed beforehand. If such is not the case, there's
a bug in PMake somewhere...

a

The output of running TESTALL, in this directory, should look something like
this, though the name pmake gives in error messages will likely be
different. In addition, the stream.test file will print 30 and 31 on Sun
operating systems <= 3.5, since processes can only have 30 streams open:

*** Testing 2c.test

--- b ---
+ : b1 
+ test d != d 
--- b ---
+ : b2 
+ test e != e 
--- a ---
+ test b c != b c 


*** Testing cmd.test

--- a ---
a
: That should have printed just "a"
: Should next get an error message about extra commands for a ignored
"cmd.test", line 14: Warning: Extra command line for "a" ignored
a
: That should have printed just "a"


*** Testing cmdvar.test

--- a ---
+ test cmd != cmd 


*** Testing comment.test

--- b ---
+ test hi there  != hi there  
--- c ---
+ test how nice to see you #scumbucket != how nice to see you #scumbucket 
--- d ---
+ test wheeee   != wheeee   
--- a ---
+ test b c d != b c d 


*** Testing cond.test

--- a ---
fish is not defined
!defined(unix) && (make(kumquat) || defined(sun)) worked
.MAKEFLAGS = -X


*** Testing condop.test

--- a ---
: decimal int worked
: hex int worked
: regular float worked
: E float worked
: negative E float worked
: string worked
: true boolean worked
: false boolean worked
: target worked
: exists worked
: make worked
: defined worked
: empty worked


*** Testing cycle.test

--- d ---
: This message should be followed by one error message:
: pmake: Graph cycles through a
: Since this is not in compatibility mode, this should be followed by
: two error messages:
: pmake: Graph cycles through a
: pmake: Graph cycles through b
: after a complaint about c not being remade because of errors
../../pmake/sparc.md/pmake: Graph cycles through a

`c' not remade because of errors.
../../pmake/sparc.md/pmake: Graph cycles through `a'
../../pmake/sparc.md/pmake: Graph cycles through `b'


*** Testing dynamic.test

--- str.o ---
test "../src/str.c" = "../src/str.c"
--- job.o ---
test "../src/job.c" = "../src/job.c"


*** Testing empty.test

--- a ---
: life I love you
: all is groovy
: -- P. Simon and A. Garfunkel


*** Testing exists.test

--- a ---
test '(' nofoo.mk = foo.mk -a -r foo.mk ')' -o '(' nofoo.mk = nofoo.mk  -a ! -r foo.mk ')'


*** Testing glob.test

--- c ---
+ test glob.test = glob.test 
--- a ---
+ : All .test files cmdvar.test null.test empty.test trans.test tab.test var.test onevar.test condop.test recurse.test vis.test stream.test exists.test keepgoing.test cycle.test stop.test order.test glob.test onecmd.test sub.test cmd.test 2c.test comment.test vpath.test cond.test shell.test dynamic.test 
+ test glob.test = glob.test 
--- b ---
+ test ../tests/glob.test = ../tests/glob.test 
--- d ---
+ + sed -n -e 1h -e 2,$H -e $x -e $s/\n/ /gp 
+ echo ../src/job.c ../src/job.h ../src/parse.c ../src/main.c ../src/dir.c ../src/targ.c ../src/cond.c ../src/str.c ../src/make.c ../src/arch.c ../src/var.c ../src/suff.c ../src/utimes.c ../src/make.h ../src/compat.c ../src/nonints.h 
+ trsort   
 \012 
f=../src/arch.c ../src/compat.c ../src/cond.c ../src/dir.c ../src/job.c ../src/job.h ../src/main.c ../src/make.c ../src/make.h ../src/nonints.h ../src/parse.c ../src/str.c ../src/suff.c ../src/targ.c ../src/utimes.c ../src/var.c
+ echo ../src/arch.c ../src/compat.c ../src/cond.c ../src/dir.c ../src/job.c ../src/job.h ../src/main.c ../src/make.c ../src/make.h ../src/nonints.h ../src/parse.c ../src/str.c ../src/suff.c ../src/targ.c ../src/utimes.c ../src/var.c 
+ test ../src/arch.c ../src/compat.c ../src/cond.c ../src/dir.c ../src/job.c ../src/job.h ../src/main.c ../src/make.c ../src/make.h ../src/nonints.h ../src/parse.c ../src/str.c ../src/suff.c ../src/targ.c ../src/utimes.c ../src/var.cx = ../src/arch.c ../src/compat.c ../src/cond.c ../src/dir.c ../src/job.c ../src/job.h ../src/main.c ../src/make.c ../src/make.h ../src/nonints.h ../src/parse.c ../src/str.c ../src/suff.c ../src/targ.c ../src/utimes.c ../src/var.cx 
--- all ---
+ : should have executed a, b, c and d 


*** Testing keepgoing.test

--- b ---
: innocuous
--- c ---
false
*** Error code 1
--- d ---
: should be executed
`a' not remade because of errors.


*** Testing null.test

--- a.c ---
: This should print
: cc -o a a.c
: nm -a a '>' a.nm
--- a ---
cc -o a a.c
--- a.nm ---
nm -a a > a.nm


*** Testing onecmd.test

--- a ---
biff me
--- b ---
false
*** Error code 1 (ignored)
: this should execute since this target has .IGNORE set
--- t2 ---
../../pmake/sparc.md/pmake -f onecmd.test -lk c d
--- c ---
ls -l TESTALL
-rwxr-xr-x  1 adam          391 Oct 29 23:11 TESTALL
false
*** Error code 1
--- d ---
: this should execute since it dependeth not on 'c'


*** Testing onevar.test

--- make.h ---
+ : make.h 
+ test ./../src != ./../src 
(P) = ./../src


*** Testing order.test

--- .BEGIN ---
rm -f q1 q2 q3
--- q1 ---
touch q1
test ! -f q2 -a ! -f q3
--- q2 ---
touch q2
test -f q1 -a ! -f q3
--- q3 ---
touch	q3
test -f q1 -a -f q2
--- .END ---
rm -f q1 q2 q3


*** Testing recurse.test

--- .BEGIN ---
: pmake should abort in a moment for a recursive variable A
../../pmake/sparc.md/pmake: Variable A is recursive.


*** Testing shell.test

--- .BEGIN ---
: for sh and csh, the output should look like
: whuffle
: false
: true
: testing _____ next
--- sh ---
whuffle
false
true
testing csh next
--- csh ---
whuffle
false
true
testing cat next
--- cat ---
echo off$
echo whuffle$
echo on$
echo off$
error check off$
echo on$
false$
echo off$
error check on$
echo on$


*** Testing stop.test

--- c ---
: This is meant to cause an error. nothing more should execute
false
*** Error code 1
../../pmake/sparc.md/pmake: 1 error


*** Testing stream.test

--- note ---
: each 'openStreams' should print "Open streams: 0 1 2"
--- openStreams ---
cc  openStreams.c  -o openStreams
--- a ---
openStreams
Open streams: 0 1 2
--- b ---
openStreams
Open streams: 0 1 2
--- c ---
openStreams
Open streams: 0 1 2
--- d ---
openStreams
Open streams: 0 1 2
--- e ---
openStreams
Open streams: 0 1 2
--- f ---
openStreams
Open streams: 0 1 2
--- g ---
openStreams
Open streams: 0 1 2
--- h ---
openStreams
Open streams: 0 1 2
--- i ---
openStreams
Open streams: 0 1 2
--- j ---
openStreams
Open streams: 0 1 2
--- k ---
openStreams
Open streams: 0 1 2
--- l ---
openStreams
Open streams: 0 1 2
--- m ---
openStreams
Open streams: 0 1 2
--- n ---
openStreams
Open streams: 0 1 2
--- o ---
openStreams
Open streams: 0 1 2
--- p ---
openStreams
Open streams: 0 1 2
--- q ---
openStreams
Open streams: 0 1 2
--- r ---
openStreams
Open streams: 0 1 2
--- s ---
openStreams
Open streams: 0 1 2
--- t ---
openStreams
Open streams: 0 1 2
--- u ---
openStreams
Open streams: 0 1 2
--- v ---
openStreams
Open streams: 0 1 2
--- w ---
openStreams
Open streams: 0 1 2
--- x ---
openStreams
Open streams: 0 1 2
--- y ---
openStreams
Open streams: 0 1 2
--- z ---
openStreams
Open streams: 0 1 2


*** Testing sub.test

--- .BEGIN ---
: If any of these aborts, check VarSubstitute, VarModify and VarParse
--- a ---
test "sbr.cmds.o fish.c 'a$a'" = "sbr.cmds.o fish.c 'a$a'"
test "sbr.cmds.o fish.o 'a$a'" = "sbr.cmds.o fish.o 'a$a'"
test "xsbr.cmds.c fish.c 'a$a'" = "xsbr.cmds.c fish.c 'a$a'"
test "xsbr.cmds.c xfish.c x'a$a'" = "xsbr.cmds.c xfish.c x'a$a'"
test "sbr.cmds.c fish.co 'a$a'" = "sbr.cmds.c fish.co 'a$a'"
test "sbr.cmds.c dog.c 'a$a'" = "sbr.cmds.c dog.c 'a$a'"
test "sbr.cmds.c fish.c 'b$a'" = "sbr.cmds.c fish.c 'b$a'"
test "sbr.cmds.c 'a$a'" = "sbr.cmds.c 'a$a'"
test "sbr.cmds.c 'a$a'" = "sbr.cmds.c 'a$a'"
test "sbr.cmds.o fish.o 'a$a'" = "sbr.cmds.o fish.o 'a$a'"


*** Testing tab.test

--- q ---
ls -l
--- q ---
: q2
--- a ---


*** Testing trans.test

--- .BEGIN ---
: This should create ucb from ucb.l via ucb.c and ucb.o
--- ucb.c ---
lex  ucb.l
mv lex.yy.c ucb.c
--- ucb.o ---
cc  -c ucb.c
--- ucb ---
cc  ucb.o  -o ucb


*** Testing var.test

--- a ---
+ : Q = ../../e.c a.out homer 
+ test ../.. . . != ../.. . . 
+ test e.c a.out homer != e.c a.out homer 
+ test ../../e a homer != ../../e a homer 
+ test c out != c out 
+ : tail of current working directory = tests 
+ pwd 
+ test /n/ne/pcgeos/Tools/pmake/src/testsx != /n/ne/pcgeos/Tools/pmake/src/testsx 
+ test ../../e.c a.out fishy \& homer != ../../e.c a.out fishy \& homer 
+ exit 0 


*** Testing vis.test

--- a ---
test "" = ""
test "" = ""


*** Testing vpath.test

--- a ---
+ test ( /usr/include/signal.h != /usr/include/signal.h ) -a ( /usr/include/signal.h != /sprite/att/lib/include/signal.h ) 


