about summary refs log tree commit diff
path: root/t/1000-basic.t
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2021-06-25 21:24:47 +0200
committerLeah Neukirchen <leah@vuxu.org>2021-06-25 21:28:19 +0200
commit32c82229d93471c25eaaaed5e76704893162a125 (patch)
tree7f396797c397dac8121fd8742d7eb9aa1cd90b64 /t/1000-basic.t
parentca309754c6aba81be4f290279666a68f75306d70 (diff)
downloadlr-32c82229d93471c25eaaaed5e76704893162a125.tar.gz
lr-32c82229d93471c25eaaaed5e76704893162a125.tar.xz
lr-32c82229d93471c25eaaaed5e76704893162a125.zip
add partial test suite testsuite
Diffstat (limited to 't/1000-basic.t')
-rwxr-xr-xt/1000-basic.t84
1 files changed, 84 insertions, 0 deletions
diff --git a/t/1000-basic.t b/t/1000-basic.t
new file mode 100755
index 0000000..016ba6f
--- /dev/null
+++ b/t/1000-basic.t
@@ -0,0 +1,84 @@
+#!/bin/sh
+. ./t/lib.sh
+
+plan 6
+
+check 'no arguments' <<'EOF'
+treegen
+lr
+<<<
+f:a
+f:b
+f:c
+>>>
+.
+a
+b
+c
+EOF
+
+check 'no arguments, recurse' <<'EOF'
+treegen
+lr
+<<<
+f:a/b/c
+>>>
+.
+a
+a/b
+a/b/c
+EOF
+
+check 'simple argument' <<'EOF'
+treegen
+lr a
+<<<
+f:a/b/c
+>>>
+a
+a/b
+a/b/c
+EOF
+
+check 'simple arguments' <<'EOF'
+treegen
+lr a d
+<<<
+f:a/b/c
+f:d/e/f
+>>>
+a
+a/b
+a/b/c
+d
+d/e
+d/e/f
+EOF
+
+check 'breadth first' <<'EOF'
+treegen
+lr -B
+<<<
+f:a/b/c
+f:a/d
+>>>
+.
+a
+a/b
+a/d
+a/b/c
+EOF
+
+check 'unsorted' <<'EOF'
+treegen
+lr -U | sort
+<<<
+f:a/b/c
+f:a/d
+>>>
+.
+a
+a/b
+a/b/c
+a/d
+EOF