summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-11-09 13:01:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-11-09 13:01:13 +0200
commitcd3758bb328ff425bb06f18c81d3c353b508a336 (patch)
treeed8a85f7c01fa83852bb6d51e4fc2dd2a268b388 /cli/tests
parent9944c0e901d370316fe55fb845ad1c3c6721038d (diff)
Add --ascii-tree for translating UTF-8 tree(1) output to ASCII
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/ascii-tree/buildfile8
-rw-r--r--cli/tests/ascii-tree/testscript43
2 files changed, 51 insertions, 0 deletions
diff --git a/cli/tests/ascii-tree/buildfile b/cli/tests/ascii-tree/buildfile
new file mode 100644
index 0000000..6450286
--- /dev/null
+++ b/cli/tests/ascii-tree/buildfile
@@ -0,0 +1,8 @@
+# file : tests/ascii-tree/buildfile
+# license : MIT; see accompanying LICENSE file
+
+import! [metadata] cli = cli%exe{cli}
+
+./: testscript $cli
+
+testscript{*}: test = $cli
diff --git a/cli/tests/ascii-tree/testscript b/cli/tests/ascii-tree/testscript
new file mode 100644
index 0000000..f0546f6
--- /dev/null
+++ b/cli/tests/ascii-tree/testscript
@@ -0,0 +1,43 @@
+# file : tests/ascii-tree/testscript
+# license : MIT; see accompanying LICENSE file
+
+: basics
+:
+cat <<EOI >=test.cli;
+"
+\
+hello/
+├── build/
+│   ├── bootstrap.build
+│   └── root.build
+├── hello/
+│   ├── sub/
+│   │   ├── bar
+│   │   └── foo
+│   ├── buildfile
+│   ├── hello.cxx
+│   └── testscript
+├── buildfile
+├── manifest
+├── README.md
+└── repositories.manifest
+\
+"
+EOI
+$* --generate-txt --ascii-tree --stdout test.cli >>EOO
+hello/
+|-- build/
+| |-- bootstrap.build
+| `-- root.build
+|-- hello/
+| |-- sub/
+| | |-- bar
+| | `-- foo
+| |-- buildfile
+| |-- hello.cxx
+| `-- testscript
+|-- buildfile
+|-- manifest
+|-- README.md
+`-- repositories.manifest
+EOO