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 | builtin-dirs() {
|
220 | run-file builtin-dirs "$@"
|
221 | }
|
222 |
|
223 | builtin-vars() {
|
224 | run-file builtin-vars "$@"
|
225 | }
|
226 |
|
227 | builtin-getopts() {
|
228 | run-file builtin-getopts "$@"
|
229 | }
|
230 |
|
231 | builtin-bracket() {
|
232 | run-file builtin-bracket "$@"
|
233 | }
|
234 |
|
235 | builtin-trap() {
|
236 | run-file builtin-trap "$@"
|
237 | }
|
238 |
|
239 | builtin-trap-err() {
|
240 | run-file builtin-trap-err "$@"
|
241 | }
|
242 |
|
243 | builtin-trap-bash() {
|
244 | run-file builtin-trap-bash "$@"
|
245 | }
|
246 |
|
247 | # Bash implements type -t, but no other shell does. For Nix.
|
248 | # zsh/mksh/dash don't have the 'help' builtin.
|
249 | builtin-bash() {
|
250 | run-file builtin-bash "$@"
|
251 | }
|
252 |
|
253 | builtin-bind() {
|
254 | run-file builtin-bind "$@"
|
255 | }
|
256 |
|
257 | builtin-type() {
|
258 | run-file builtin-type "$@"
|
259 | }
|
260 |
|
261 | builtin-type-bash() {
|
262 | run-file builtin-type-bash "$@"
|
263 | }
|
264 |
|
265 | vars-bash() {
|
266 | run-file vars-bash "$@"
|
267 | }
|
268 |
|
269 | vars-special() {
|
270 | run-file vars-special "$@"
|
271 | }
|
272 |
|
273 | builtin-completion() {
|
274 | run-file builtin-completion "$@"
|
275 | }
|
276 |
|
277 | builtin-special() {
|
278 | run-file builtin-special "$@"
|
279 | }
|
280 |
|
281 | builtin-times() {
|
282 | run-file builtin-times "$@"
|
283 | }
|
284 |
|
285 | command-parsing() {
|
286 | run-file command-parsing "$@"
|
287 | }
|
288 |
|
289 | func-parsing() {
|
290 | run-file func-parsing "$@"
|
291 | }
|
292 |
|
293 | sh-func() {
|
294 | run-file sh-func "$@"
|
295 | }
|
296 |
|
297 | glob() {
|
298 | run-file glob "$@"
|
299 | }
|
300 |
|
301 | globignore() {
|
302 | run-file globignore "$@"
|
303 | }
|
304 |
|
305 | arith() {
|
306 | run-file arith "$@"
|
307 | }
|
308 |
|
309 | arith-dynamic() {
|
310 | run-file arith-dynamic "$@"
|
311 | }
|
312 |
|
313 | command-sub() {
|
314 | sh-spec spec/command-sub.test.sh \
|
315 | ${REF_SHELLS[@]} $OSH_LIST "$@"
|
316 | }
|
317 |
|
318 | command_() {
|
319 | sh-spec spec/command_.test.sh \
|
320 | ${REF_SHELLS[@]} $ZSH $OSH_LIST "$@"
|
321 | }
|
322 |
|
323 | pipeline() {
|
324 | run-file pipeline "$@"
|
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-basic() {
|
462 | run-file array-basic "$@"
|
463 | }
|
464 |
|
465 | array-compat() {
|
466 | run-file array-compat "$@"
|
467 | }
|
468 |
|
469 | type-compat() {
|
470 | run-file type-compat "$@"
|
471 | }
|
472 |
|
473 | # += is not POSIX and not in dash.
|
474 | append() {
|
475 | run-file append "$@"
|
476 | }
|
477 |
|
478 | # associative array -- mksh and zsh implement different associative arrays.
|
479 | assoc() {
|
480 | run-file assoc "$@"
|
481 | }
|
482 |
|
483 | # ZSH also has associative arrays
|
484 | assoc-zsh() {
|
485 | sh-spec spec/assoc-zsh.test.sh $ZSH "$@"
|
486 | }
|
487 |
|
488 | dbracket() {
|
489 | run-file dbracket "$@"
|
490 | }
|
491 |
|
492 | dparen() {
|
493 | run-file dparen "$@"
|
494 | }
|
495 |
|
496 | brace-expansion() {
|
497 | run-file brace-expansion "$@"
|
498 | }
|
499 |
|
500 | regex() {
|
501 | run-file regex "$@"
|
502 | }
|
503 |
|
504 | process-sub() {
|
505 | run-file process-sub "$@"
|
506 | }
|
507 |
|
508 | # This does file system globbing
|
509 | extglob-files() {
|
510 | run-file extglob-files "$@"
|
511 | }
|
512 |
|
513 | # This does string matching.
|
514 | extglob-match() {
|
515 | sh-spec spec/extglob-match.test.sh \
|
516 | $BASH $MKSH $OSH_LIST "$@"
|
517 | }
|
518 |
|
519 | nocasematch-match() {
|
520 | run-file nocasematch-match "$@"
|
521 | }
|
522 |
|
523 | # ${!var} syntax -- oil should replace this with associative arrays.
|
524 | # mksh has completely different behavior for this syntax. Not worth testing.
|
525 | var-ref() {
|
526 | run-file var-ref "$@"
|
527 | }
|
528 |
|
529 | nameref() {
|
530 | ### declare -n / local -n
|
531 | run-file nameref "$@"
|
532 | }
|
533 |
|
534 | let() {
|
535 | sh-spec spec/let.test.sh $BASH $MKSH $ZSH "$@"
|
536 | }
|
537 |
|
538 | for-expr() {
|
539 | run-file for-expr "$@"
|
540 | }
|
541 |
|
542 | empty-bodies() {
|
543 | sh-spec spec/empty-bodies.test.sh "${REF_SHELLS[@]}" $ZSH $OSH_LIST "$@"
|
544 | }
|
545 |
|
546 | # TODO: This is for the ANTLR grammars, in the oil-sketch repo.
|
547 | # osh has infinite loop?
|
548 | shell-grammar() {
|
549 | sh-spec spec/shell-grammar.test.sh $BASH $MKSH $ZSH "$@"
|
550 | }
|
551 |
|
552 | serialize() {
|
553 | run-file serialize "$@"
|
554 | }
|
555 |
|
556 | #
|
557 | # Smoosh
|
558 | #
|
559 |
|
560 | readonly SMOOSH_REPO=~/git/languages/smoosh
|
561 |
|
562 | sh-spec-smoosh-env() {
|
563 | local test_file=$1
|
564 | shift
|
565 |
|
566 | # - smoosh tests use $TEST_SHELL instead of $SH
|
567 | # - cd $TMP to avoid littering repo
|
568 | # - pass -o posix
|
569 | # - timeout of 1 second
|
570 | # - Some tests in smoosh use $HOME and $LOGNAME
|
571 |
|
572 | sh-spec $test_file \
|
573 | --sh-env-var-name TEST_SHELL \
|
574 | --posix \
|
575 | --env-pair "TEST_UTIL=$SMOOSH_REPO/tests/util" \
|
576 | --env-pair "LOGNAME=$LOGNAME" \
|
577 | --env-pair "HOME=$HOME" \
|
578 | --timeout 1 \
|
579 | --oils-bin-dir $REPO_ROOT/bin \
|
580 | --compare-shells \
|
581 | "$@"
|
582 | }
|
583 |
|
584 | # For speed, only run with one copy of OSH.
|
585 | readonly smoosh_osh_list=$OSH_CPYTHON
|
586 |
|
587 | smoosh() {
|
588 | ### Run case smoosh from the console
|
589 |
|
590 | # TODO: Use --oils-bin-dir
|
591 | # our_shells, etc.
|
592 |
|
593 | sh-spec-smoosh-env _tmp/smoosh.test.sh \
|
594 | ${REF_SHELLS[@]} $smoosh_osh_list \
|
595 | "$@"
|
596 | }
|
597 |
|
598 | smoosh-hang() {
|
599 | ### Run case smoosh-hang from the console
|
600 |
|
601 | # Need the smoosh timeout tool to run correctly.
|
602 | sh-spec-smoosh-env _tmp/smoosh-hang.test.sh \
|
603 | --timeout-bin "$SMOOSH_REPO/tests/util/timeout" \
|
604 | --timeout 1 \
|
605 | "$@"
|
606 | }
|
607 |
|
608 | _one-html() {
|
609 | local spec_name=$1
|
610 | shift
|
611 |
|
612 | local out_dir=_tmp/spec/smoosh
|
613 | local tmp_dir=_tmp/src-smoosh
|
614 | mkdir -p $out_dir $out_dir
|
615 |
|
616 | doctools/src_tree.py smoosh-file \
|
617 | _tmp/$spec_name.test.sh \
|
618 | $out_dir/$spec_name.test.html
|
619 |
|
620 | local out=$out_dir/${spec_name}.html
|
621 | set +o errexit
|
622 | # Shell function is smoosh or smoosh-hang
|
623 | time $spec_name --format html "$@" > $out
|
624 | set -o errexit
|
625 |
|
626 | echo
|
627 | echo "Wrote $out"
|
628 |
|
629 | # NOTE: This IGNORES the exit status.
|
630 | }
|
631 |
|
632 | # TODO:
|
633 | # - Put these tests in the CI
|
634 | # - Import smoosh spec tests into the repo, with 'test/smoosh.sh'
|
635 |
|
636 | smoosh-html() {
|
637 | ### Run by devtools/release.sh
|
638 | _one-html smoosh "$@"
|
639 | }
|
640 |
|
641 | smoosh-hang-html() {
|
642 | ### Run by devtools/release.sh
|
643 | _one-html smoosh-hang "$@"
|
644 | }
|
645 |
|
646 | html-demo() {
|
647 | ### Test for --format html
|
648 |
|
649 | local out=_tmp/spec/demo.html
|
650 | builtin-special --format html "$@" > $out
|
651 |
|
652 | echo
|
653 | echo "Wrote $out"
|
654 | }
|
655 |
|
656 | #
|
657 | # Hay is part of the YSH suite
|
658 | #
|
659 |
|
660 | hay() {
|
661 | run-file hay "$@"
|
662 | }
|
663 |
|
664 | hay-isolation() {
|
665 | run-file hay-isolation "$@"
|
666 | }
|
667 |
|
668 | hay-meta() {
|
669 | run-file hay-meta "$@"
|
670 | }
|
671 |
|
672 | #
|
673 | # YSH
|
674 | #
|
675 |
|
676 | ysh-TODO-deprecate() {
|
677 | run-file ysh-TODO-deprecate "$@"
|
678 | }
|
679 |
|
680 | ysh-convert() {
|
681 | run-file ysh-convert "$@"
|
682 | }
|
683 |
|
684 | ysh-completion() {
|
685 | run-file ysh-completion "$@"
|
686 | }
|
687 |
|
688 | ysh-stdlib() {
|
689 | run-file ysh-stdlib "$@"
|
690 | }
|
691 |
|
692 | ysh-stdlib-args() {
|
693 | run-file ysh-stdlib-args "$@"
|
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-control-flow() {
|
745 | run-file ysh-control-flow "$@"
|
746 | }
|
747 |
|
748 | ysh-bugs() {
|
749 | run-file ysh-bugs "$@"
|
750 | }
|
751 |
|
752 | ysh-builtins() {
|
753 | run-file ysh-builtins "$@"
|
754 | }
|
755 |
|
756 | ysh-builtin-module() {
|
757 | run-file ysh-builtin-module "$@"
|
758 | }
|
759 |
|
760 | ysh-builtin-eval() {
|
761 | run-file ysh-builtin-eval "$@"
|
762 | }
|
763 |
|
764 | # Related to errexit-oil
|
765 | ysh-builtin-error() {
|
766 | run-file ysh-builtin-error "$@"
|
767 | }
|
768 |
|
769 | ysh-builtin-meta() {
|
770 | run-file ysh-builtin-meta "$@"
|
771 | }
|
772 |
|
773 | ysh-builtin-process() {
|
774 | run-file ysh-builtin-process "$@"
|
775 | }
|
776 |
|
777 | ysh-builtin-shopt() {
|
778 | run-file ysh-builtin-shopt "$@"
|
779 | }
|
780 |
|
781 | ysh-case() {
|
782 | run-file ysh-case "$@"
|
783 | }
|
784 |
|
785 | ysh-command-sub() {
|
786 | run-file ysh-command-sub "$@"
|
787 | }
|
788 |
|
789 | ysh-demo() {
|
790 | run-file ysh-demo "$@"
|
791 | }
|
792 |
|
793 | ysh-env() {
|
794 | run-file ysh-env "$@"
|
795 | }
|
796 |
|
797 | ysh-expr() {
|
798 | run-file ysh-expr "$@"
|
799 | }
|
800 |
|
801 | ysh-int-float() {
|
802 | run-file ysh-int-float "$@"
|
803 | }
|
804 |
|
805 | ysh-expr-bool() {
|
806 | run-file ysh-expr-bool "$@"
|
807 | }
|
808 |
|
809 | ysh-expr-arith() {
|
810 | run-file ysh-expr-arith "$@"
|
811 | }
|
812 |
|
813 | ysh-expr-compare() {
|
814 | run-file ysh-expr-compare "$@"
|
815 | }
|
816 |
|
817 | ysh-expr-sub() {
|
818 | run-file ysh-expr-sub "$@"
|
819 | }
|
820 |
|
821 | ysh-cmd-lang() {
|
822 | run-file ysh-cmd-lang "$@"
|
823 | }
|
824 |
|
825 | ysh-for() {
|
826 | run-file ysh-for "$@"
|
827 | }
|
828 |
|
829 | ysh-methods() {
|
830 | run-file ysh-methods "$@"
|
831 | }
|
832 |
|
833 | ysh-method-io() {
|
834 | run-file ysh-method-io "$@"
|
835 | }
|
836 |
|
837 | ysh-namespaces() {
|
838 | run-file ysh-namespaces "$@"
|
839 | }
|
840 |
|
841 | ysh-object() {
|
842 | run-file ysh-object "$@"
|
843 | }
|
844 |
|
845 | ysh-closures() {
|
846 | run-file ysh-closures "$@"
|
847 | }
|
848 |
|
849 | ysh-func() {
|
850 | run-file ysh-func "$@"
|
851 | }
|
852 |
|
853 | ysh-func-builtin() {
|
854 | run-file ysh-func-builtin "$@"
|
855 | }
|
856 |
|
857 | ysh-funcs-external() {
|
858 | run-file ysh-funcs-external "$@"
|
859 | }
|
860 |
|
861 | ysh-interactive() {
|
862 | run-file ysh-interactive "$@"
|
863 | }
|
864 |
|
865 | ysh-json() {
|
866 | run-file ysh-json "$@"
|
867 | }
|
868 |
|
869 | ysh-keywords() {
|
870 | run-file ysh-keywords "$@"
|
871 | }
|
872 |
|
873 | ysh-multiline() {
|
874 | run-file ysh-multiline "$@"
|
875 | }
|
876 |
|
877 | ysh-options() {
|
878 | run-file ysh-options "$@"
|
879 | }
|
880 |
|
881 | ysh-options-assign() {
|
882 | run-file ysh-options-assign "$@"
|
883 | }
|
884 |
|
885 | ysh-proc() {
|
886 | run-file ysh-proc "$@"
|
887 | }
|
888 |
|
889 | ysh-proc-meta() {
|
890 | run-file ysh-proc-meta "$@"
|
891 | }
|
892 |
|
893 | ysh-regex() {
|
894 | run-file ysh-regex "$@"
|
895 | }
|
896 |
|
897 | ysh-regex-api() {
|
898 | run-file ysh-regex-api "$@"
|
899 | }
|
900 |
|
901 | ysh-reserved() {
|
902 | run-file ysh-reserved "$@"
|
903 | }
|
904 |
|
905 | ysh-scope() {
|
906 | run-file ysh-scope "$@"
|
907 | }
|
908 |
|
909 | ysh-slice-range() {
|
910 | run-file ysh-slice-range "$@"
|
911 | }
|
912 |
|
913 | ysh-string() {
|
914 | run-file ysh-string "$@"
|
915 | }
|
916 |
|
917 | ysh-special-vars() {
|
918 | run-file ysh-special-vars "$@"
|
919 | }
|
920 |
|
921 | ysh-tuple() {
|
922 | run-file ysh-tuple "$@"
|
923 | }
|
924 |
|
925 | ysh-var-sub() {
|
926 | run-file ysh-var-sub "$@"
|
927 | }
|
928 |
|
929 | ysh-with-sh() {
|
930 | run-file ysh-with-sh "$@"
|
931 | }
|
932 |
|
933 | ysh-word-eval() {
|
934 | run-file ysh-word-eval "$@"
|
935 | }
|
936 |
|
937 | ysh-xtrace() {
|
938 | run-file ysh-xtrace "$@"
|
939 | }
|
940 |
|
941 | ysh-user-feedback() {
|
942 | run-file ysh-user-feedback "$@"
|
943 | }
|
944 |
|
945 | ysh-builtin-ctx() {
|
946 | run-file ysh-builtin-ctx "$@"
|
947 | }
|
948 |
|
949 | ysh-builtin-error() {
|
950 | run-file ysh-builtin-error "$@"
|
951 | }
|
952 |
|
953 | ysh-builtin-help() {
|
954 | run-file ysh-builtin-help "$@"
|
955 | }
|
956 |
|
957 | ysh-dev() {
|
958 | run-file ysh-dev "$@"
|
959 | }
|
960 |
|
961 | ysh-printing() {
|
962 | run-file ysh-printing "$@"
|
963 | }
|
964 |
|
965 |
|
966 | #
|
967 | # More OSH
|
968 | #
|
969 |
|
970 | nix-idioms() {
|
971 | run-file nix-idioms "$@"
|
972 | }
|
973 |
|
974 | zsh-idioms() {
|
975 | run-file zsh-idioms "$@"
|
976 | }
|
977 |
|
978 | ble-idioms() {
|
979 | sh-spec spec/ble-idioms.test.sh \
|
980 | $BASH $ZSH $MKSH $BUSYBOX_ASH $OSH_LIST "$@"
|
981 | }
|
982 |
|
983 | ble-features() {
|
984 | run-file ble-features "$@"
|
985 | }
|
986 |
|
987 | toysh() {
|
988 | run-file toysh "$@"
|
989 | }
|
990 |
|
991 | toysh-posix() {
|
992 | run-file toysh-posix "$@"
|
993 | }
|
994 |
|
995 | task-five "$@"
|