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