about summary refs log tree commit diff
path: root/t/1000-basic.t
diff options
context:
space:
mode:
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