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