1 | #!/usr/bin/env bash
|
2 | #
|
3 | # Usage:
|
4 | # test/spec.sh <function name>
|
5 |
|
6 | : ${LIB_OSH=stdlib/osh}
|
7 | source $LIB_OSH/bash-strict.sh
|
8 | source $LIB_OSH/task-five.sh
|
9 |
|
10 | REPO_ROOT=$(cd "$(dirname $0)/.."; pwd)
|
11 |
|
12 | source test/common.sh
|
13 | source test/spec-common.sh
|
14 |
|
15 | if test -z "${IN_NIX_SHELL:-}"; then
|
16 | source build/dev-shell.sh # to run 'dash', etc.
|
17 | fi
|
18 |
|
19 | # TODO: Just use 'dash bash' and $PATH
|
20 | readonly DASH=dash
|
21 | readonly BASH=bash
|
22 | readonly MKSH=mksh
|
23 | readonly ZSH=zsh
|
24 | readonly BUSYBOX_ASH=ash
|
25 |
|
26 | # ash and dash are similar, so not including ash by default. zsh is not quite
|
27 | # POSIX.
|
28 | readonly REF_SHELLS=($DASH $BASH $MKSH)
|
29 |
|
30 | check-survey-shells() {
|
31 | ### Make sure bash, zsh, OSH, etc. exist
|
32 |
|
33 | # Note: yash isn't here, but it is used in a couple tests
|
34 |
|
35 | test/spec-runner.sh shell-sanity-check "${REF_SHELLS[@]}" $ZSH $BUSYBOX_ASH $OSH_LIST
|
36 | }
|
37 |
|
38 | # TODO: remove this stub after we hollow out this file
|
39 |
|
40 | run-file() { test/spec-py.sh run-file "$@"; }
|
41 |
|
42 | #
|
43 | # Misc
|
44 | #
|
45 |
|
46 | # Really what I want is enter(func) and exit(func), and filter by regex?
|
47 | trace-var-sub() {
|
48 | local out=_tmp/coverage
|
49 | mkdir -p $out
|
50 |
|
51 | # This creates *.cover files, with line counts.
|
52 | #python -m trace --count -C $out \
|
53 |
|
54 | # This prints trace with line numbers to stdout.
|
55 | #python -m trace --trace -C $out \
|
56 | PYTHONPATH=. python -m trace --trackcalls -C $out \
|
57 | test/sh_spec.py spec/var-sub.test.sh $DASH $BASH "$@"
|
58 |
|
59 | ls -l $out
|
60 | head $out/*.cover
|
61 | }
|
62 |
|
63 | #
|
64 | # Individual tests.
|
65 | #
|
66 | # We configure the shells they run on and the number of allowed failures (to
|
67 | # prevent regressions.)
|
68 | #
|
69 |
|
70 | interactive-parse() {
|
71 | run-file interactive-parse "$@"
|
72 | }
|
73 |
|
74 | smoke() {
|
75 | run-file smoke "$@"
|
76 | }
|
77 |
|
78 | interactive() {
|
79 | run-file interactive "$@"
|
80 | }
|
81 |
|
82 | prompt() {
|
83 | run-file prompt "$@"
|
84 | }
|
85 |
|
86 | bugs() {
|
87 | run-file bugs "$@"
|
88 | }
|
89 |
|
90 | osh-bugs() {
|
91 | run-file osh-bugs "$@"
|
92 | }
|
93 |
|
94 | blog1() {
|
95 | sh-spec spec/blog1.test.sh \
|
96 | ${REF_SHELLS[@]} $ZSH $OSH_LIST "$@"
|
97 | }
|
98 |
|
99 | blog2() {
|
100 | run-file blog2 "$@"
|
101 | }
|
102 |
|
103 | blog-other1() {
|
104 | sh-spec spec/blog-other1.test.sh \
|
105 | ${REF_SHELLS[@]} $ZSH $OSH_LIST "$@"
|
106 | }
|
107 |
|
108 | alias() {
|
109 | run-file alias "$@"
|
110 | }
|
111 |
|
112 | comments() {
|
113 | sh-spec spec/comments.test.sh ${REF_SHELLS[@]} $OSH_LIST "$@"
|
114 | }
|
115 |
|
116 | word-split() {
|
117 | run-file word-split "$@"
|
118 | }
|
119 |
|
120 | word-eval() {
|
121 | sh-spec spec/word-eval.test.sh \
|
122 | ${REF_SHELLS[@]} $OSH_LIST "$@"
|
123 | }
|
124 |
|
125 | # These cases apply to many shells.
|
126 | assign() {
|
127 | run-file assign "$@"
|
128 | }
|
129 |
|
130 | # These cases apply to a few shells.
|
131 | assign-extended() {
|
132 | run-file assign-extended "$@"
|
133 | }
|
134 |
|
135 | # Corner cases that OSH doesn't handle
|
136 | assign-deferred() {
|
137 | sh-spec spec/assign-deferred.test.sh \
|
138 | $BASH $MKSH "$@"
|
139 | }
|
140 |
|
141 | # These test associative arrays
|
142 | assign-dialects() {
|
143 | run-file assign-dialects "$@"
|
144 | }
|
145 |
|
146 | background() {
|
147 | run-file background "$@"
|
148 | }
|
149 |
|
150 | subshell() {
|
151 | run-file subshell "$@"
|
152 | }
|
153 |
|
154 | quote() {
|
155 | run-file quote "$@"
|
156 | }
|
157 |
|
158 | unicode() {
|
159 | run-file unicode "$@"
|
160 | }
|
161 |
|
162 | loop() {
|
163 | run-file loop "$@"
|
164 | }
|
165 |
|
166 | case_() {
|
167 | run-file case_ "$@"
|
168 | }
|
169 |
|
170 | if_() {
|
171 | run-file if_ "$@"
|
172 | }
|
173 |
|
174 | builtin-misc() {
|
175 | run-file builtin-misc "$@"
|
176 | }
|
177 |
|
178 | builtin-process() {
|
179 | run-file builtin-process "$@"
|
180 | }
|
181 |
|
182 | builtin-cd() {
|
183 | run-file builtin-cd "$@"
|
184 | }
|
185 |
|
186 | builtin-eval-source() {
|
187 | run-file builtin-eval-source "$@"
|
188 | }
|
189 |
|
190 | builtin-echo() {
|
191 | run-file builtin-echo "$@"
|
192 | }
|
193 |
|
194 | builtin-read() {
|
195 | run-file builtin-read "$@"
|
196 | }
|
197 |
|
198 | nul-bytes() {
|
199 | run-file nul-bytes "$@"
|
200 | }
|
201 |
|
202 | whitespace() {
|
203 | run-file whitespace "$@"
|
204 | }
|
205 |
|
206 | # Special bash printf things like -v and %q. Portable stuff goes in builtin-io.
|
207 | builtin-printf() {
|
208 | run-file builtin-printf "$@"
|
209 | }
|
210 |
|
211 | builtin-meta() {
|
212 | run-file builtin-meta "$@"
|
213 | }
|
214 |
|
215 | builtin-history() {
|
216 | run-file builtin-history "$@"
|
217 | }
|
218 |
|
219 | # dash and mksh don't implement 'dirs'
|
220 | builtin-dirs() {
|
221 | sh-spec spec/builtin-dirs.test.sh \
|
222 | $BASH $ZSH $OSH_LIST "$@"
|
223 | }
|
224 |
|
225 | builtin-vars() {
|
226 | run-file builtin-vars "$@"
|
227 | }
|
228 |
|
229 | builtin-getopts() {
|
230 | run-file builtin-getopts "$@"
|
231 | }
|
232 |
|
233 | builtin-bracket() {
|
234 | run-file builtin-bracket "$@"
|
235 | }
|
236 |
|
237 | builtin-trap() {
|
238 | run-file builtin-trap "$@"
|
239 | }
|
240 |
|
241 | builtin-trap-err() {
|
242 | run-file builtin-trap-err "$@"
|
243 | }
|
244 |
|
245 | builtin-trap-bash() {
|
246 | run-file builtin-trap-bash "$@"
|
247 | }
|
248 |
|
249 | # Bash implements type -t, but no other shell does. For Nix.
|
250 | # zsh/mksh/dash don't have the 'help' builtin.
|
251 | builtin-bash() {
|
252 | run-file builtin-bash "$@"
|
253 | }
|
254 |
|
255 | builtin-type() {
|
256 | run-file builtin-type "$@"
|
257 | }
|
258 |
|
259 | builtin-type-bash() {
|
260 | run-file builtin-type-bash "$@"
|
261 | }
|
262 |
|
263 | vars-bash() {
|
264 | run-file vars-bash "$@"
|
265 | }
|
266 |
|
267 | vars-special() {
|
268 | run-file vars-special "$@"
|
269 | }
|
270 |
|
271 | builtin-completion() {
|
272 | run-file builtin-completion "$@"
|
273 | }
|
274 |
|
275 | builtin-special() {
|
276 | run-file builtin-special "$@"
|
277 | }
|
278 |
|
279 | builtin-times() {
|
280 | sh-spec spec/builtin-times.test.sh $BASH $ZSH $OSH_LIST "$@"
|
281 | }
|
282 |
|
283 | command-parsing() {
|
284 | sh-spec spec/command-parsing.test.sh ${REF_SHELLS[@]} $OSH_LIST "$@"
|
285 | }
|
286 |
|
287 | func-parsing() {
|
288 | sh-spec spec/func-parsing.test.sh ${REF_SHELLS[@]} $OSH_LIST "$@"
|
289 | }
|
290 |
|
291 | sh-func() {
|
292 | run-file sh-func "$@"
|
293 | }
|
294 |
|
295 | glob() {
|
296 | run-file glob "$@"
|
297 | }
|
298 |
|
299 | globignore() {
|
300 | run-file globignore "$@"
|
301 | }
|
302 |
|
303 | arith() {
|
304 | run-file arith "$@"
|
305 | }
|
306 |
|
307 | command-sub() {
|
308 | sh-spec spec/command-sub.test.sh \
|
309 | ${REF_SHELLS[@]} $OSH_LIST "$@"
|
310 | }
|
311 |
|
312 | command_() {
|
313 | sh-spec spec/command_.test.sh \
|
314 | ${REF_SHELLS[@]} $ZSH $OSH_LIST "$@"
|
315 | }
|
316 |
|
317 | pipeline() {
|
318 | run-file pipeline "$@"
|
319 | }
|
320 |
|
321 | explore-parsing() {
|
322 | sh-spec spec/explore-parsing.test.sh \
|
323 | ${REF_SHELLS[@]} $OSH_LIST "$@"
|
324 | }
|
325 |
|
326 | parse-errors() {
|
327 | run-file parse-errors "$@"
|
328 | }
|
329 |
|
330 | here-doc() {
|
331 | # NOTE: The last two tests, 31 and 32, have different behavior on my Ubuntu
|
332 | # and Debian machines.
|
333 | # - On Ubuntu, read_from_fd.py fails with Errno 9 -- bad file descriptor.
|
334 | # - On Debian, the whole process hangs.
|
335 | # Is this due to Python 3.2 vs 3.4? Either way osh doesn't implement the
|
336 | # functionality, so it's probably best to just implement it.
|
337 | sh-spec spec/here-doc.test.sh --range 0-31 \
|
338 | ${REF_SHELLS[@]} $OSH_LIST "$@"
|
339 | }
|
340 |
|
341 | redirect() {
|
342 | run-file redirect "$@"
|
343 | }
|
344 |
|
345 | redirect-command() {
|
346 | run-file redirect-command "$@"
|
347 | }
|
348 |
|
349 | redirect-multi() {
|
350 | run-file redirect-multi "$@"
|
351 | }
|
352 |
|
353 | posix() {
|
354 | sh-spec spec/posix.test.sh \
|
355 | ${REF_SHELLS[@]} $OSH_LIST "$@"
|
356 | }
|
357 |
|
358 | introspect() {
|
359 | run-file introspect "$@"
|
360 | }
|
361 |
|
362 | tilde() {
|
363 | run-file tilde "$@"
|
364 | }
|
365 |
|
366 | var-op-test() {
|
367 | run-file var-op-test "$@"
|
368 | }
|
369 |
|
370 | var-op-len() {
|
371 | sh-spec spec/var-op-len.test.sh \
|
372 | ${REF_SHELLS[@]} $ZSH $OSH_LIST "$@"
|
373 | }
|
374 |
|
375 | var-op-patsub() {
|
376 | # 1 unicode failure, and [^]] which is a parsing divergence
|
377 | run-file var-op-patsub "$@"
|
378 | }
|
379 |
|
380 | var-op-slice() {
|
381 | run-file var-op-slice "$@"
|
382 | }
|
383 |
|
384 | var-op-bash() {
|
385 | run-file var-op-bash "$@"
|
386 | }
|
387 |
|
388 | var-op-strip() {
|
389 | sh-spec spec/var-op-strip.test.sh \
|
390 | ${REF_SHELLS[@]} $ZSH $BUSYBOX_ASH $OSH_LIST "$@"
|
391 | }
|
392 |
|
393 | var-sub() {
|
394 | # NOTE: ZSH has interesting behavior, like echo hi > "$@" can write to TWO
|
395 | # FILES! But ultimately we don't really care, so I disabled it.
|
396 | sh-spec spec/var-sub.test.sh \
|
397 | ${REF_SHELLS[@]} $OSH_LIST "$@"
|
398 | }
|
399 |
|
400 | var-num() {
|
401 | run-file var-num "$@"
|
402 | }
|
403 |
|
404 | var-sub-quote() {
|
405 | sh-spec spec/var-sub-quote.test.sh \
|
406 | ${REF_SHELLS[@]} $OSH_LIST "$@"
|
407 | }
|
408 |
|
409 | sh-usage() {
|
410 | run-file sh-usage "$@"
|
411 | }
|
412 |
|
413 | sh-options() {
|
414 | run-file sh-options "$@"
|
415 | }
|
416 |
|
417 | xtrace() {
|
418 | run-file xtrace "$@"
|
419 | }
|
420 |
|
421 | strict-options() {
|
422 | run-file strict-options "$@"
|
423 | }
|
424 |
|
425 | exit-status() {
|
426 | run-file exit-status "$@"
|
427 | }
|
428 |
|
429 | errexit() {
|
430 | run-file errexit "$@"
|
431 | }
|
432 |
|
433 | errexit-osh() {
|
434 | run-file errexit-osh "$@"
|
435 | }
|
436 |
|
437 | fatal-errors() {
|
438 | sh-spec spec/fatal-errors.test.sh \
|
439 | ${REF_SHELLS[@]} $ZSH $OSH_LIST "$@"
|
440 | }
|
441 |
|
442 | #
|
443 | # Non-POSIX extensions: arrays, brace expansion, [[, ((, etc.
|
444 | #
|
445 |
|
446 | # There as many non-POSIX arithmetic contexts.
|
447 | arith-context() {
|
448 | run-file arith-context "$@"
|
449 | }
|
450 |
|
451 | array() {
|
452 | run-file array "$@"
|
453 | }
|
454 |
|
455 | array-basic() {
|
456 | run-file array-basic "$@"
|
457 | }
|
458 |
|
459 | array-compat() {
|
460 | run-file array-compat "$@"
|
461 | }
|
462 |
|
463 | type-compat() {
|
464 | run-file type-compat "$@"
|
465 | }
|
466 |
|
467 | # += is not POSIX and not in dash.
|
468 | append() {
|
469 | run-file append "$@"
|
470 | }
|
471 |
|
472 | # associative array -- mksh and zsh implement different associative arrays.
|
473 | assoc() {
|
474 | run-file assoc "$@"
|
475 | }
|
476 |
|
477 | # ZSH also has associative arrays
|
478 | assoc-zsh() {
|
479 | sh-spec spec/assoc-zsh.test.sh $ZSH "$@"
|
480 | }
|
481 |
|
482 | dbracket() {
|
483 | run-file dbracket "$@"
|
484 | }
|
485 |
|
486 | dparen() {
|
487 | run-file dparen "$@"
|
488 | }
|
489 |
|
490 | brace-expansion() {
|
491 | run-file brace-expansion "$@"
|
492 | }
|
493 |
|
494 | regex() {
|
495 | run-file regex "$@"
|
496 | }
|
497 |
|
498 | process-sub() {
|
499 | run-file process-sub "$@"
|
500 | }
|
501 |
|
502 | # This does file system globbing
|
503 | extglob-files() {
|
504 | run-file extglob-files "$@"
|
505 | }
|
506 |
|
507 | # This does string matching.
|
508 | extglob-match() {
|
509 | sh-spec spec/extglob-match.test.sh \
|
510 | $BASH $MKSH $OSH_LIST "$@"
|
511 | }
|
512 |
|
513 | nocasematch-match() {
|
514 | run-file nocasematch-match "$@"
|
515 | }
|
516 |
|
517 | # ${!var} syntax -- oil should replace this with associative arrays.
|
518 | # mksh has completely different behavior for this syntax. Not worth testing.
|
519 | var-ref() {
|
520 | run-file var-ref "$@"
|
521 | }
|
522 |
|
523 | nameref() {
|
524 | ### declare -n / local -n
|
525 | run-file nameref "$@"
|
526 | }
|
527 |
|
528 | let() {
|
529 | sh-spec spec/let.test.sh $BASH $MKSH $ZSH "$@"
|
530 | }
|
531 |
|
532 | for-expr() {
|
533 | run-file for-expr "$@"
|
534 | }
|
535 |
|
536 | empty-bodies() {
|
537 | sh-spec spec/empty-bodies.test.sh "${REF_SHELLS[@]}" $ZSH $OSH_LIST "$@"
|
538 | }
|
539 |
|
540 | # TODO: This is for the ANTLR grammars, in the oil-sketch repo.
|
541 | # osh has infinite loop?
|
542 | shell-grammar() {
|
543 | sh-spec spec/shell-grammar.test.sh $BASH $MKSH $ZSH "$@"
|
544 | }
|
545 |
|
546 | serialize() {
|
547 | run-file serialize "$@"
|
548 | }
|
549 |
|
550 | #
|
551 | # Smoosh
|
552 | #
|
553 |
|
554 | readonly SMOOSH_REPO=~/git/languages/smoosh
|
555 |
|
556 | sh-spec-smoosh-env() {
|
557 | local test_file=$1
|
558 | shift
|
559 |
|
560 | # - smoosh tests use $TEST_SHELL instead of $SH
|
561 | # - cd $TMP to avoid littering repo
|
562 | # - pass -o posix
|
563 | # - timeout of 1 second
|
564 | # - Some tests in smoosh use $HOME and $LOGNAME
|
565 |
|
566 | sh-spec $test_file \
|
567 | --sh-env-var-name TEST_SHELL \
|
568 | --posix \
|
569 | --env-pair "TEST_UTIL=$SMOOSH_REPO/tests/util" \
|
570 | --env-pair "LOGNAME=$LOGNAME" \
|
571 | --env-pair "HOME=$HOME" \
|
572 | --timeout 1 \
|
573 | --oils-bin-dir $REPO_ROOT/bin \
|
574 | --compare-shells \
|
575 | "$@"
|
576 | }
|
577 |
|
578 | # For speed, only run with one copy of OSH.
|
579 | readonly smoosh_osh_list=$OSH_CPYTHON
|
580 |
|
581 | smoosh() {
|
582 | ### Run case smoosh from the console
|
583 |
|
584 | # TODO: Use --oils-bin-dir
|
585 | # our_shells, etc.
|
586 |
|
587 | sh-spec-smoosh-env _tmp/smoosh.test.sh \
|
588 | ${REF_SHELLS[@]} $smoosh_osh_list \
|
589 | "$@"
|
590 | }
|
591 |
|
592 | smoosh-hang() {
|
593 | ### Run case smoosh-hang from the console
|
594 |
|
595 | # Need the smoosh timeout tool to run correctly.
|
596 | sh-spec-smoosh-env _tmp/smoosh-hang.test.sh \
|
597 | --timeout-bin "$SMOOSH_REPO/tests/util/timeout" \
|
598 | --timeout 1 \
|
599 | "$@"
|
600 | }
|
601 |
|
602 | _one-html() {
|
603 | local spec_name=$1
|
604 | shift
|
605 |
|
606 | local out_dir=_tmp/spec/smoosh
|
607 | local tmp_dir=_tmp/src-smoosh
|
608 | mkdir -p $out_dir $out_dir
|
609 |
|
610 | doctools/src_tree.py smoosh-file \
|
611 | _tmp/$spec_name.test.sh \
|
612 | $out_dir/$spec_name.test.html
|
613 |
|
614 | local out=$out_dir/${spec_name}.html
|
615 | set +o errexit
|
616 | # Shell function is smoosh or smoosh-hang
|
617 | time $spec_name --format html "$@" > $out
|
618 | set -o errexit
|
619 |
|
620 | echo
|
621 | echo "Wrote $out"
|
622 |
|
623 | # NOTE: This IGNORES the exit status.
|
624 | }
|
625 |
|
626 | # TODO:
|
627 | # - Put these tests in the CI
|
628 | # - Import smoosh spec tests into the repo, with 'test/smoosh.sh'
|
629 |
|
630 | smoosh-html() {
|
631 | ### Run by devtools/release.sh
|
632 | _one-html smoosh "$@"
|
633 | }
|
634 |
|
635 | smoosh-hang-html() {
|
636 | ### Run by devtools/release.sh
|
637 | _one-html smoosh-hang "$@"
|
638 | }
|
639 |
|
640 | html-demo() {
|
641 | ### Test for --format html
|
642 |
|
643 | local out=_tmp/spec/demo.html
|
644 | builtin-special --format html "$@" > $out
|
645 |
|
646 | echo
|
647 | echo "Wrote $out"
|
648 | }
|
649 |
|
650 | #
|
651 | # Hay is part of the YSH suite
|
652 | #
|
653 |
|
654 | hay() {
|
655 | run-file hay "$@"
|
656 | }
|
657 |
|
658 | hay-isolation() {
|
659 | run-file hay-isolation "$@"
|
660 | }
|
661 |
|
662 | hay-meta() {
|
663 | run-file hay-meta "$@"
|
664 | }
|
665 |
|
666 | #
|
667 | # YSH
|
668 | #
|
669 |
|
670 | ysh-TODO-deprecate() {
|
671 | run-file ysh-TODO-deprecate "$@"
|
672 | }
|
673 |
|
674 | ysh-convert() {
|
675 | run-file ysh-convert "$@"
|
676 | }
|
677 |
|
678 | ysh-completion() {
|
679 | run-file ysh-completion "$@"
|
680 | }
|
681 |
|
682 | ysh-stdlib() {
|
683 | run-file ysh-stdlib "$@"
|
684 | }
|
685 |
|
686 | ysh-stdlib-2() {
|
687 | run-file ysh-stdlib-2 "$@"
|
688 | }
|
689 |
|
690 | ysh-stdlib-args() {
|
691 | run-file ysh-stdlib-args "$@"
|
692 | }
|
693 |
|
694 | ysh-stdlib-testing() {
|
695 | run-file ysh-stdlib-testing "$@"
|
696 | }
|
697 |
|
698 | ysh-stdlib-synch() {
|
699 | run-file ysh-stdlib-synch "$@"
|
700 | }
|
701 |
|
702 | ysh-source() {
|
703 | run-file ysh-source "$@"
|
704 | }
|
705 |
|
706 | ysh-usage() {
|
707 | run-file ysh-usage "$@"
|
708 | }
|
709 |
|
710 | ysh-unicode() {
|
711 | run-file ysh-unicode "$@"
|
712 | }
|
713 |
|
714 | ysh-bin() {
|
715 | run-file ysh-bin "$@"
|
716 | }
|
717 |
|
718 | ysh-dict() {
|
719 | run-file ysh-dict "$@"
|
720 | }
|
721 |
|
722 | ysh-list() {
|
723 | run-file ysh-list "$@"
|
724 | }
|
725 |
|
726 | ysh-place() {
|
727 | run-file ysh-place "$@"
|
728 | }
|
729 |
|
730 | ysh-prompt() {
|
731 | run-file ysh-prompt "$@"
|
732 | }
|
733 |
|
734 | ysh-assign() {
|
735 | run-file ysh-assign "$@"
|
736 | }
|
737 |
|
738 | ysh-augmented() {
|
739 | run-file ysh-augmented "$@"
|
740 | }
|
741 |
|
742 | ysh-blocks() {
|
743 | run-file ysh-blocks "$@"
|
744 | }
|
745 |
|
746 | ysh-bugs() {
|
747 | run-file ysh-bugs "$@"
|
748 | }
|
749 |
|
750 | ysh-builtins() {
|
751 | run-file ysh-builtins "$@"
|
752 | }
|
753 |
|
754 | ysh-builtin-module() {
|
755 | run-file ysh-builtin-module "$@"
|
756 | }
|
757 |
|
758 | ysh-builtin-eval() {
|
759 | run-file ysh-builtin-eval "$@"
|
760 | }
|
761 |
|
762 | # Related to errexit-oil
|
763 | ysh-builtin-error() {
|
764 | run-file ysh-builtin-error "$@"
|
765 | }
|
766 |
|
767 | ysh-builtin-meta() {
|
768 | run-file ysh-builtin-meta "$@"
|
769 | }
|
770 |
|
771 | ysh-builtin-process() {
|
772 | run-file ysh-builtin-process "$@"
|
773 | }
|
774 |
|
775 | ysh-builtin-shopt() {
|
776 | run-file ysh-builtin-shopt "$@"
|
777 | }
|
778 |
|
779 | ysh-case() {
|
780 | run-file ysh-case "$@"
|
781 | }
|
782 |
|
783 | ysh-command-sub() {
|
784 | run-file ysh-command-sub "$@"
|
785 | }
|
786 |
|
787 | ysh-demo() {
|
788 | run-file ysh-demo "$@"
|
789 | }
|
790 |
|
791 | ysh-expr() {
|
792 | run-file ysh-expr "$@"
|
793 | }
|
794 |
|
795 | ysh-int-float() {
|
796 | run-file ysh-int-float "$@"
|
797 | }
|
798 |
|
799 | ysh-expr-bool() {
|
800 | run-file ysh-expr-bool "$@"
|
801 | }
|
802 |
|
803 | ysh-expr-arith() {
|
804 | run-file ysh-expr-arith "$@"
|
805 | }
|
806 |
|
807 | ysh-expr-compare() {
|
808 | run-file ysh-expr-compare "$@"
|
809 | }
|
810 |
|
811 | ysh-expr-sub() {
|
812 | run-file ysh-expr-sub "$@"
|
813 | }
|
814 |
|
815 | ysh-cmd-lang() {
|
816 | run-file ysh-cmd-lang "$@"
|
817 | }
|
818 |
|
819 | ysh-for() {
|
820 | run-file ysh-for "$@"
|
821 | }
|
822 |
|
823 | ysh-methods() {
|
824 | run-file ysh-methods "$@"
|
825 | }
|
826 |
|
827 | ysh-method-io() {
|
828 | run-file ysh-method-io "$@"
|
829 | }
|
830 |
|
831 | ysh-object() {
|
832 | run-file ysh-object "$@"
|
833 | }
|
834 |
|
835 | ysh-func() {
|
836 | run-file ysh-func "$@"
|
837 | }
|
838 |
|
839 | ysh-func-builtin() {
|
840 | run-file ysh-func-builtin "$@"
|
841 | }
|
842 |
|
843 | ysh-funcs-external() {
|
844 | run-file ysh-funcs-external "$@"
|
845 | }
|
846 |
|
847 | ysh-interactive() {
|
848 | run-file ysh-interactive "$@"
|
849 | }
|
850 |
|
851 | ysh-json() {
|
852 | run-file ysh-json "$@"
|
853 | }
|
854 |
|
855 | ysh-keywords() {
|
856 | run-file ysh-keywords "$@"
|
857 | }
|
858 |
|
859 | ysh-multiline() {
|
860 | run-file ysh-multiline "$@"
|
861 | }
|
862 |
|
863 | ysh-options() {
|
864 | run-file ysh-options "$@"
|
865 | }
|
866 |
|
867 | ysh-options-assign() {
|
868 | run-file ysh-options-assign "$@"
|
869 | }
|
870 |
|
871 | ysh-proc() {
|
872 | run-file ysh-proc "$@"
|
873 | }
|
874 |
|
875 | ysh-regex() {
|
876 | run-file ysh-regex "$@"
|
877 | }
|
878 |
|
879 | ysh-regex-api() {
|
880 | run-file ysh-regex-api "$@"
|
881 | }
|
882 |
|
883 | ysh-reserved() {
|
884 | run-file ysh-reserved "$@"
|
885 | }
|
886 |
|
887 | ysh-scope() {
|
888 | run-file ysh-scope "$@"
|
889 | }
|
890 |
|
891 | ysh-slice-range() {
|
892 | run-file ysh-slice-range "$@"
|
893 | }
|
894 |
|
895 | ysh-string() {
|
896 | run-file ysh-string "$@"
|
897 | }
|
898 |
|
899 | ysh-special-vars() {
|
900 | run-file ysh-special-vars "$@"
|
901 | }
|
902 |
|
903 | ysh-tuple() {
|
904 | run-file ysh-tuple "$@"
|
905 | }
|
906 |
|
907 | ysh-var-sub() {
|
908 | run-file ysh-var-sub "$@"
|
909 | }
|
910 |
|
911 | ysh-with-sh() {
|
912 | run-file ysh-with-sh "$@"
|
913 | }
|
914 |
|
915 | ysh-word-eval() {
|
916 | run-file ysh-word-eval "$@"
|
917 | }
|
918 |
|
919 | ysh-xtrace() {
|
920 | run-file ysh-xtrace "$@"
|
921 | }
|
922 |
|
923 | ysh-user-feedback() {
|
924 | run-file ysh-user-feedback "$@"
|
925 | }
|
926 |
|
927 | ysh-builtin-ctx() {
|
928 | run-file ysh-builtin-ctx "$@"
|
929 | }
|
930 |
|
931 | ysh-builtin-error() {
|
932 | run-file ysh-builtin-error "$@"
|
933 | }
|
934 |
|
935 | ysh-builtin-help() {
|
936 | run-file ysh-builtin-help "$@"
|
937 | }
|
938 |
|
939 | ysh-dev() {
|
940 | run-file ysh-dev "$@"
|
941 | }
|
942 |
|
943 | ysh-printing() {
|
944 | run-file ysh-printing "$@"
|
945 | }
|
946 |
|
947 |
|
948 | #
|
949 | # More OSH
|
950 | #
|
951 |
|
952 | nix-idioms() {
|
953 | run-file nix-idioms "$@"
|
954 | }
|
955 |
|
956 | zsh-idioms() {
|
957 | run-file zsh-idioms "$@"
|
958 | }
|
959 |
|
960 | ble-idioms() {
|
961 | sh-spec spec/ble-idioms.test.sh \
|
962 | $BASH $ZSH $MKSH $BUSYBOX_ASH $OSH_LIST "$@"
|
963 | }
|
964 |
|
965 | ble-features() {
|
966 | run-file ble-features "$@"
|
967 | }
|
968 |
|
969 | toysh() {
|
970 | run-file toysh "$@"
|
971 | }
|
972 |
|
973 | toysh-posix() {
|
974 | run-file toysh-posix "$@"
|
975 | }
|
976 |
|
977 | task-five "$@"
|