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
32 # This has to be a separate file because sh_spec.py strips comments!
33 . $REPO_ROOT/spec/testdata/doc-comments.sh
34
35 pp proc
36 echo ---
37 pp proc f
38 ## STDOUT:
39 proc_name doc_comment
40 f 'doc \' comment with " quotes'
41 g ''
42 myproc 'Oil-style proc'
43 ---
44 proc_name doc_comment
45 f 'doc \' comment with " quotes'
46 ## END