1 |
## our_shell: ysh |
2 |
|
3 |
# Hm can we do this entirely in user code, not as a builtin? |
4 |
|
5 |
#### Describe Prototype |
6 |
|
7 |
hay define argparse |
8 |
|
9 |
# Oops, we're running into this problem ... |
10 |
|
11 |
hay define argparse/flag |
12 |
|
13 |
proc p { |
14 |
echo STDOUT |
15 |
echo STDERR >& 2 |
16 |
return 42 |
17 |
} |
18 |
|
19 |
describe p { |
20 |
# each case changes to a clean directory? |
21 |
# |
22 |
# and each one is numbered? |
23 |
|
24 |
it 'prints to stdout and stderr' { |
25 |
try { |
26 |
p > out 2>& err |
27 |
} |
28 |
assert (_status === 42) |
29 |
|
30 |
cat out |
31 |
cat err |
32 |
} |
33 |
} |
34 |
|
35 |
## STDOUT: |
36 |
TODO |
37 |
## END |