blob: b26cffae3c758574d8b5898f9d26c1c0c88dc9aa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh
echo -n $0: 'OPEN file locking... '
cat >test.bas <<'eof'
on error goto 10
print "opening file"
open "test.out" for output lock write as #1
print "open succeeded"
if command$<>"enough" then shell "sh ./test/runbas test.bas enough"
end
10 print "open failed"
eof
cat >test.ref <<'eof'
opening file
open succeeded
opening file
open failed
eof
sh ./test/runbas test.bas >test.data
if cmp test.ref test.data
then
rm -f test.*
echo passed
else
echo failed
exit 1
fi
|