summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 0b2d931..01ff9c0 100755
--- a/tests.sh
+++ b/tests.sh
@@ -518,6 +518,7 @@ gnu_tests=(
test_fprint
test_fprint_duplicate
test_fprint_error
+ test_fprint_truncate
test_fprint0
@@ -723,6 +724,7 @@ bfs_tests=(
test_execdir_plus
+ test_fprint_append
test_fprint_duplicate_stdout
test_fprint_error_stdout
test_fprint_error_stderr
@@ -1725,6 +1727,33 @@ function test_fprint_duplicate_stdout() {
fi
}
+function test_fprint_truncate() {
+ printf "basic\nbasic\n" >scratch/test_fprint_truncate.out
+
+ invoke_bfs basic -maxdepth 0 -fprint scratch/test_fprint_truncate.out
+ sort -o scratch/test_fprint_truncate.out scratch/test_fprint_truncate.out
+
+ if [ "$UPDATE" ]; then
+ cp {scratch,"$TESTS"}/test_fprint_truncate.out
+ else
+ diff -u {"$TESTS",scratch}/test_fprint_truncate.out
+ fi
+}
+
+function test_fprint_append() {
+ rm -f scratch/test_fprint_append.out
+
+ invoke_bfs basic -fprint scratch/test_fprint_append.out >>scratch/test_fprint_append.out
+ invoke_bfs basic -fprint scratch/test_fprint_append.out >>scratch/test_fprint_append.out
+ sort -o scratch/test_fprint_append.out scratch/test_fprint_append.out
+
+ if [ "$UPDATE" ]; then
+ cp {scratch,"$TESTS"}/test_fprint_append.out
+ else
+ diff -u {"$TESTS",scratch}/test_fprint_append.out
+ fi
+}
+
function test_double_dash() {
cd basic
bfs_diff -- . -type f