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