1 # spec/ysh-source
2
3 ## oils_failures_allowed: 0
4
5 #### --builtin flag
6 shopt --set ysh:upgrade
7
8 source $LIB_YSH/math.ysh
9
10 json write (max(1, 2))
11 ## STDOUT:
12 2
13 ## END
14
15 #### no path passed with --builtin flag
16 shopt --set ysh:upgrade
17
18 source --builtin
19 ## status: 2
20 ## STDOUT:
21 ## END
22
23 #### non-existant path passed to --builtin flag
24 shopt --set ysh:upgrade
25
26 source --builtin test/this-file-will-never-exist.ysh
27 ## status: 2
28 ## STDOUT:
29 ## END