1 |
|
2 |
#### pp cell |
3 |
x=42 |
4 |
|
5 |
pp cell x |
6 |
echo status=$? |
7 |
|
8 |
pp -- cell :x |
9 |
echo status=$? |
10 |
|
11 |
pp cell nonexistent |
12 |
echo status=$? |
13 |
## STDOUT: |
14 |
x = (Cell exported:F readonly:F nameref:F val:(value.Str s:42)) |
15 |
status=0 |
16 |
x = (Cell exported:F readonly:F nameref:F val:(value.Str s:42)) |
17 |
status=0 |
18 |
status=1 |
19 |
## END |
20 |
|
21 |
#### pp cell on indexed array with hole |
22 |
declare -a array |
23 |
array[3]=42 |
24 |
pp cell array |
25 |
## STDOUT: |
26 |
array = (Cell exported:F readonly:F nameref:F val:(value.MaybeStrArray strs:[_ _ _ 42])) |
27 |
## END |
28 |
|
29 |
|
30 |
#### pp proc |
31 |
shopt --set oil:upgrade |
32 |
|
33 |
# This has to be a separate file because sh_spec.py strips comments! |
34 |
. $REPO_ROOT/spec/testdata/doc-comments.sh |
35 |
|
36 |
pp proc |
37 |
echo --- |
38 |
pp proc f |
39 |
## STDOUT: |
40 |
proc_name doc_comment |
41 |
f 'doc \' comment with " quotes' |
42 |
g '' |
43 |
myproc 'Oil-style proc' |
44 |
--- |
45 |
proc_name doc_comment |
46 |
f 'doc \' comment with " quotes' |
47 |
## END |