From 71c8f67cb861f5334d853a23b7aafa3c97a802f6 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 2 Jan 2017 21:23:42 -0700 Subject: tests: Add tests for -quit --- tests.sh | 22 +++++++++++++++++++++- tests/test_0123.out | 1 + tests/test_0124.out | 2 ++ tests/test_0125.out | 2 ++ tests/test_0126.out | 1 + 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tests/test_0123.out create mode 100644 tests/test_0124.out create mode 100644 tests/test_0125.out create mode 100644 tests/test_0126.out diff --git a/tests.sh b/tests.sh index 3729133..444112d 100755 --- a/tests.sh +++ b/tests.sh @@ -760,9 +760,29 @@ function test_0122() { bfs_diff basic -type f -size 1T } +function test_0123() { + [ "$BSD" -o "$GNU" ] || return 0 + bfs_diff basic/g -print -name g -quit +} + +function test_0124() { + [ "$BSD" -o "$GNU" ] || return 0 + bfs_diff basic/g -print -name h -quit +} + +function test_0125() { + [ "$BSD" -o "$GNU" ] || return 0 + bfs_diff basic/g -depth -print -name g -quit +} + +function test_0126() { + [ "$BSD" -o "$GNU" ] || return 0 + bfs_diff basic/g -depth -print -name h -quit +} + result=0 -for i in {1..122}; do +for i in {1..126}; do test="test_$(printf '%04d' $i)" if [ -t 1 ]; then diff --git a/tests/test_0123.out b/tests/test_0123.out new file mode 100644 index 0000000..cf4d5a9 --- /dev/null +++ b/tests/test_0123.out @@ -0,0 +1 @@ +basic/g diff --git a/tests/test_0124.out b/tests/test_0124.out new file mode 100644 index 0000000..fb683c7 --- /dev/null +++ b/tests/test_0124.out @@ -0,0 +1,2 @@ +basic/g +basic/g/h diff --git a/tests/test_0125.out b/tests/test_0125.out new file mode 100644 index 0000000..fb683c7 --- /dev/null +++ b/tests/test_0125.out @@ -0,0 +1,2 @@ +basic/g +basic/g/h diff --git a/tests/test_0126.out b/tests/test_0126.out new file mode 100644 index 0000000..72b086d --- /dev/null +++ b/tests/test_0126.out @@ -0,0 +1 @@ +basic/g/h -- cgit v1.2.3