commit - fd79e2e02793239b5efc0d2ffda3c44a49a85e8a
commit + bfbccd0a546344106bb6e22074678a396d7bcad0
blob - 3545c70c0dda58bb94b05ce3283e0363d56bd80b
blob + 7a5ad3671fa62d02f74a21cc4f0edf7be252462a
--- regress/cmdline/patch.sh
+++ regress/cmdline/patch.sh
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
(cd $testroot/wt && got patch patch) > $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
echo "A eta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
echo eta > $testroot/wt/eta.expected
cmp -s $testroot/wt/eta.expected $testroot/wt/eta
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/wt/eta.expected $testroot/wt/eta
fi
test_done $testroot $ret
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
(cd $testroot/wt && got patch patch) > $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
(cd $testroot/wt && got patch patch) > $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
echo 'alpha is my favourite character' > $testroot/wt/alpha.expected
cmp -s $testroot/wt/alpha.expected $testroot/wt/alpha
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/wt/alpha.expected $testroot/wt/alpha
fi
test_done $testroot $ret
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
(cd $testroot/wt && got patch patch) > $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
echo alpha >> $testroot/wt/alpha.expected
cmp -s $testroot/wt/alpha.expected $testroot/wt/alpha
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/wt/alpha.expected $testroot/wt/alpha
fi
test_done $testroot $ret
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
(cd $testroot/wt/ && got add numbers && got ci -m 'add numbers') \
>/dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
(cd $testroot/wt && got patch patch) > $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
jot 10 | sed 's/6/foo/' > $testroot/wt/numbers.expected
cmp -s $testroot/wt/numbers.expected $testroot/wt/numbers
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/wt/numbers.expected $testroot/wt/numbers
fi
test_done $testroot $ret
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
(cd $testroot/wt/ && got add numbers && got ci -m 'add numbers') \
>/dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
(cd $testroot/wt && got patch patch) > $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
cmp -s $testroot/wt/numbers.expected $testroot/wt/numbers
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/wt/numbers.expected $testroot/wt/numbers
fi
test_done $testroot $ret
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
(cd $testroot/wt && got patch patch) > $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
for f in alpha beta gamma/delta; do
cmp -s $testroot/wt/$f.expected $testroot/wt/$f
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/wt/$f.expected $testroot/wt/$f
test_done $testroot $ret
return 1
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
> $testroot/stdout \
2> $testroot/stderr
ret=$?
- if [ $ret == 0 ]; then # should fail
+ if [ $ret -eq 0 ]; then # should fail
test_done $testroot 1
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
cmp -s $testroot/stderr.expected $testroot/stderr
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done $testroot $ret
return 1
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
> $testroot/stdout \
2> $testroot/stderr
ret=$?
- if [ $ret == 0 ]; then
+ if [ $ret -eq 0 ]; then
echo "got managed to apply an invalid patch"
test_done $testroot 1
return 1
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
cmp -s $testroot/stderr.expected $testroot/stderr
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done $testroot $ret
return 1
> $testroot/stdout \
2> $testroot/stderr
ret=$?
- if [ $ret == 0 ]; then
+ if [ $ret -eq 0 ]; then
echo "got managed to apply an invalid patch"
test_done $testroot 1
return 1
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
cmp -s $testroot/stderr.expected $testroot/stderr
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done $testroot $ret
return 1
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
> $testroot/stdout \
2> $testroot/stderr
ret=$?
- if [ $ret == 0 ]; then # should fail
+ if [ $ret -eq 0 ]; then # should fail
test_done $testroot 1
return 1
fi
-
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
cmp -s $testroot/stderr.expected $testroot/stderr
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done $testroot $ret
return 1
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
(cd $testroot/wt && got patch patch) > $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done $testroot $ret
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done $testroot $ret
return 1
echo alpha >> $testroot/wt/alpha.expected
cmp -s $testroot/wt/alpha.expected $testroot/wt/alpha
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/wt/alpha.expected $testroot/wt/alpha
fi
test_done $testroot $ret