OILS / spec / ysh-builtin-help.test.sh View on Github | oilshell.org

50 lines, 28 significant
1## oils_failures_allowed: 1
2
3#### help topics that are embedded
4help > help.txt
5echo no args $?
6
7for topic in help oils-usage {osh,ysh}-usage {osh,ysh}-chapters; do
8 help $topic > $topic.txt
9 echo $topic $?
10done
11
12help zz > zz.txt
13echo zz $?
14## STDOUT:
15no args 0
16help 0
17oils-usage 0
18osh-usage 0
19ysh-usage 0
20osh-chapters 0
21ysh-chapters 0
22zz 1
23## END
24
25#### help topics that are linked
26help command-sub | grep -o chap-word-lang.html
27echo status=$?
28
29help read | grep -o chap-builtin-cmd.html
30echo status=$?
31
32## STDOUT:
33chap-word-lang.html
34status=0
35chap-builtin-cmd.html
36status=0
37## END
38
39#### help shows 'ysh-chapters' topic
40
41# doesn't show ANSI text unless TTY
42help | grep ysh-chapters
43
44echo status=$?
45
46## STDOUT:
47TODO fix dev-minimal ~~~ ysh-chapters ~~~
48status=0
49## END
50