gloo 6.4.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/docs/application.md +9 -0
  3. data/docs/language_objects.md +40 -0
  4. data/docs/objects.md +1 -1
  5. data/docs/verbs.md +9 -0
  6. data/lib/VERSION +1 -1
  7. data/lib/VERSION_NOTES +7 -0
  8. data/lib/gloo/app/engine.rb +5 -1
  9. data/lib/gloo/app/log.rb +5 -5
  10. data/lib/gloo/app/settings.rb +4 -1
  11. data/lib/gloo/core/obj.rb +21 -1
  12. data/lib/gloo/persist/file_loader.rb +7 -0
  13. data/lib/gloo/persist/persist_man.rb +35 -3
  14. data/lib/gloo/persist/source/obj_node.rb +41 -0
  15. data/lib/gloo/verbs/list.rb +24 -2
  16. data/lib/gloo/verbs/load.rb +4 -1
  17. data/test.gloo/ctrl/each.test.gloo +28 -30
  18. data/test.gloo/dt/date.test.gloo +69 -71
  19. data/test.gloo/dt/datetime.test.gloo +55 -57
  20. data/test.gloo/dt/time.test.gloo +70 -72
  21. data/test.gloo/lang/continuation.test.gloo +25 -27
  22. data/test.gloo/lang/convert.test.gloo +50 -52
  23. data/test.gloo/lang/dt_comparisons.test.gloo +87 -89
  24. data/test.gloo/lang/exceptions.test.gloo +42 -44
  25. data/test.gloo/lang/gloo_sys.test.gloo +100 -102
  26. data/test.gloo/lang/here.test.gloo +32 -34
  27. data/test.gloo/lang/it.test.gloo +27 -29
  28. data/test.gloo/lang/literal.test.gloo +55 -57
  29. data/test.gloo/lang/load_lib_directive.test.gloo +18 -20
  30. data/test.gloo/lang/naming.test.gloo +28 -30
  31. data/test.gloo/lang/ops.test.gloo +53 -55
  32. data/test.gloo/lang/shorthand.test.gloo +15 -17
  33. data/test.gloo/math/add.test.gloo +40 -42
  34. data/test.gloo/math/div.test.gloo +23 -25
  35. data/test.gloo/math/mult.test.gloo +23 -25
  36. data/test.gloo/math/sub.test.gloo +23 -25
  37. data/test.gloo/objs/alias.test.gloo +15 -17
  38. data/test.gloo/objs/bool.test.gloo +54 -56
  39. data/test.gloo/objs/can.test.gloo +33 -35
  40. data/test.gloo/objs/cipher.test.gloo +39 -41
  41. data/test.gloo/objs/decimal.test.gloo +27 -29
  42. data/test.gloo/objs/erb.test.gloo +47 -49
  43. data/test.gloo/objs/file.test.gloo +68 -70
  44. data/test.gloo/objs/function.test.gloo +37 -39
  45. data/test.gloo/objs/int.test.gloo +54 -56
  46. data/test.gloo/objs/json.test.gloo +56 -58
  47. data/test.gloo/objs/obj.test.gloo +68 -48
  48. data/test.gloo/objs/outline.test.gloo +48 -50
  49. data/test.gloo/objs/password.test.gloo +34 -36
  50. data/test.gloo/objs/repeat.test.gloo +42 -44
  51. data/test.gloo/objs/script.test.gloo +13 -15
  52. data/test.gloo/objs/string.test.gloo +82 -84
  53. data/test.gloo/objs/text.test.gloo +90 -92
  54. data/test.gloo/objs/untyped.test.gloo +36 -38
  55. data/test.gloo/objs/uri.test.gloo +37 -39
  56. data/test.gloo/verbs/break.test.gloo +12 -14
  57. data/test.gloo/verbs/check.test.gloo +22 -24
  58. data/test.gloo/verbs/context.test.gloo +11 -13
  59. data/test.gloo/verbs/create.test.gloo +7 -9
  60. data/test.gloo/verbs/eval.test.gloo +10 -12
  61. data/test.gloo/verbs/exists.test.gloo +43 -45
  62. data/test.gloo/verbs/if.test.gloo +8 -10
  63. data/test.gloo/verbs/invoke.test.gloo +73 -75
  64. data/test.gloo/verbs/list.test.gloo +21 -23
  65. data/test.gloo/verbs/load.test.gloo +27 -21
  66. data/test.gloo/verbs/log.test.gloo +7 -9
  67. data/test.gloo/verbs/move.test.gloo +12 -14
  68. data/test.gloo/verbs/put.test.gloo +10 -12
  69. data/test.gloo/verbs/reload.test.gloo +30 -32
  70. data/test.gloo/verbs/run.test.gloo +8 -10
  71. data/test.gloo/verbs/save.test.gloo +90 -94
  72. data/test.gloo/verbs/show.test.gloo +26 -28
  73. data/test.gloo/verbs/tell.test.gloo +8 -10
  74. data/test.gloo/verbs/throw.test.gloo +31 -33
  75. data/test.gloo/verbs/unless.test.gloo +13 -15
  76. data/test.gloo/verbs/unload.test.gloo +10 -12
  77. metadata +1 -1
@@ -2,123 +2,121 @@
2
2
  # Date/time/datetime comparison operator tests
3
3
  #
4
4
 
5
- tests [can] :
6
- lang [can] :
7
- dt_comparisons [can] :
5
+ tests.lang.dt_comparisons [can] :
8
6
 
9
- early_date [date] :
10
- late_date [date] :
11
- early_time [time] :
12
- late_time [time] :
13
- early_dt [datetime] :
14
- late_dt [datetime] :
7
+ early_date [date] :
8
+ late_date [date] :
9
+ early_time [time] :
10
+ late_time [time] :
11
+ early_dt [datetime] :
12
+ late_dt [datetime] :
15
13
 
16
- confirm_date_ops [test] :
17
- description [string] : Confirm comparisons between two dates.
18
- on_test [script] :
19
- put '2025.01.01' into ^^.early_date
20
- put '2025.06.01' into ^^.late_date
14
+ confirm_date_ops [test] :
15
+ description [string] : Confirm comparisons between two dates.
16
+ on_test [script] :
17
+ put '2025.01.01' into ^^.early_date
18
+ put '2025.06.01' into ^^.late_date
21
19
 
22
- eval ^^.late_date > ^^.early_date
23
- assert "expected late date to be greater than early date"
20
+ eval ^^.late_date > ^^.early_date
21
+ assert "expected late date to be greater than early date"
24
22
 
25
- eval ^^.early_date < ^^.late_date
26
- assert "expected early date to be less than late date"
23
+ eval ^^.early_date < ^^.late_date
24
+ assert "expected early date to be less than late date"
27
25
 
28
- eval ^^.early_date = ^^.early_date
29
- assert "expected a date to equal itself"
26
+ eval ^^.early_date = ^^.early_date
27
+ assert "expected a date to equal itself"
30
28
 
31
- eval ^^.early_date != ^^.late_date
32
- assert "expected different dates to not be equal"
29
+ eval ^^.early_date != ^^.late_date
30
+ assert "expected different dates to not be equal"
33
31
 
34
- eval ^^.early_date >= ^^.early_date
35
- assert "expected a date to be >= itself"
32
+ eval ^^.early_date >= ^^.early_date
33
+ assert "expected a date to be >= itself"
36
34
 
37
- eval ^^.late_date <= ^^.early_date
38
- refute "expected late date to not be <= early date"
35
+ eval ^^.late_date <= ^^.early_date
36
+ refute "expected late date to not be <= early date"
39
37
 
40
- confirm_time_ops [test] :
41
- description [string] : Confirm comparisons between two times.
42
- on_test [script] :
43
- put '09:00:00 am' into ^^.early_time
44
- put '05:00:00 pm' into ^^.late_time
38
+ confirm_time_ops [test] :
39
+ description [string] : Confirm comparisons between two times.
40
+ on_test [script] :
41
+ put '09:00:00 am' into ^^.early_time
42
+ put '05:00:00 pm' into ^^.late_time
45
43
 
46
- eval ^^.late_time > ^^.early_time
47
- assert "expected late time to be greater than early time"
44
+ eval ^^.late_time > ^^.early_time
45
+ assert "expected late time to be greater than early time"
48
46
 
49
- eval ^^.early_time < ^^.late_time
50
- assert "expected early time to be less than late time"
47
+ eval ^^.early_time < ^^.late_time
48
+ assert "expected early time to be less than late time"
51
49
 
52
- eval ^^.early_time = ^^.early_time
53
- assert "expected a time to equal itself"
50
+ eval ^^.early_time = ^^.early_time
51
+ assert "expected a time to equal itself"
54
52
 
55
- eval ^^.early_time != ^^.late_time
56
- assert "expected different times to not be equal"
53
+ eval ^^.early_time != ^^.late_time
54
+ assert "expected different times to not be equal"
57
55
 
58
- confirm_datetime_ops [test] :
59
- description [string] : Confirm comparisons between two datetimes.
60
- on_test [script] :
61
- put '2025.01.01 09:00:00 am' into ^^.early_dt
62
- put '2025.01.01 05:00:00 pm' into ^^.late_dt
56
+ confirm_datetime_ops [test] :
57
+ description [string] : Confirm comparisons between two datetimes.
58
+ on_test [script] :
59
+ put '2025.01.01 09:00:00 am' into ^^.early_dt
60
+ put '2025.01.01 05:00:00 pm' into ^^.late_dt
63
61
 
64
- eval ^^.late_dt > ^^.early_dt
65
- assert "expected late datetime to be greater than early datetime"
62
+ eval ^^.late_dt > ^^.early_dt
63
+ assert "expected late datetime to be greater than early datetime"
66
64
 
67
- eval ^^.early_dt < ^^.late_dt
68
- assert "expected early datetime to be less than late datetime"
65
+ eval ^^.early_dt < ^^.late_dt
66
+ assert "expected early datetime to be less than late datetime"
69
67
 
70
- eval ^^.early_dt = ^^.early_dt
71
- assert "expected a datetime to equal itself"
68
+ eval ^^.early_dt = ^^.early_dt
69
+ assert "expected a datetime to equal itself"
72
70
 
73
- eval ^^.early_dt != ^^.late_dt
74
- assert "expected different datetimes to not be equal"
71
+ eval ^^.early_dt != ^^.late_dt
72
+ assert "expected different datetimes to not be equal"
75
73
 
76
- confirm_date_vs_datetime [test] :
77
- description [string] : Confirm a date coerces to midnight when compared to a datetime.
78
- on_test [script] :
79
- put '2025.06.01' into ^^.early_date
80
- put '2025.06.01 12:00:00 am' into ^^.early_dt
81
- put '2025.06.01 09:00:00 am' into ^^.late_dt
74
+ confirm_date_vs_datetime [test] :
75
+ description [string] : Confirm a date coerces to midnight when compared to a datetime.
76
+ on_test [script] :
77
+ put '2025.06.01' into ^^.early_date
78
+ put '2025.06.01 12:00:00 am' into ^^.early_dt
79
+ put '2025.06.01 09:00:00 am' into ^^.late_dt
82
80
 
83
- eval ^^.early_date = ^^.early_dt
84
- assert "expected date to equal midnight of the same day"
81
+ eval ^^.early_date = ^^.early_dt
82
+ assert "expected date to equal midnight of the same day"
85
83
 
86
- eval ^^.late_dt > ^^.early_date
87
- assert "expected later datetime to be greater than the date"
84
+ eval ^^.late_dt > ^^.early_date
85
+ assert "expected later datetime to be greater than the date"
88
86
 
89
- confirm_date_vs_time_is_false [test] :
90
- description [string] : Confirm dates and times never compare as equal or ordered.
91
- on_test [script] :
92
- put '2025.06.01' into ^^.early_date
93
- put '09:00:00 am' into ^^.early_time
87
+ confirm_date_vs_time_is_false [test] :
88
+ description [string] : Confirm dates and times never compare as equal or ordered.
89
+ on_test [script] :
90
+ put '2025.06.01' into ^^.early_date
91
+ put '09:00:00 am' into ^^.early_time
94
92
 
95
- eval ^^.early_date > ^^.early_time
96
- refute "expected date > time to be false"
93
+ eval ^^.early_date > ^^.early_time
94
+ refute "expected date > time to be false"
97
95
 
98
- eval ^^.early_date = ^^.early_time
99
- refute "expected date = time to be false"
96
+ eval ^^.early_date = ^^.early_time
97
+ refute "expected date = time to be false"
100
98
 
101
- eval ^^.early_date != ^^.early_time
102
- refute "expected date != time to be false, since they can't be compared"
99
+ eval ^^.early_date != ^^.early_time
100
+ refute "expected date != time to be false, since they can't be compared"
103
101
 
104
- confirm_date_vs_loose_string [test] :
105
- description [string] : Confirm a date can compare against a loosely formatted string.
106
- on_test [script] :
107
- put '2025.06.01' into ^^.late_date
102
+ confirm_date_vs_loose_string [test] :
103
+ description [string] : Confirm a date can compare against a loosely formatted string.
104
+ on_test [script] :
105
+ put '2025.06.01' into ^^.late_date
108
106
 
109
- eval ^^.late_date > "2025-01-01"
110
- assert "expected date to be greater than a loosely parsed earlier date string"
107
+ eval ^^.late_date > "2025-01-01"
108
+ assert "expected date to be greater than a loosely parsed earlier date string"
111
109
 
112
- eval ^^.late_date > "not a date"
113
- refute "expected comparison against an unparseable string to be false"
110
+ eval ^^.late_date > "not a date"
111
+ refute "expected comparison against an unparseable string to be false"
114
112
 
115
- confirm_date_vs_integer_is_false [test] :
116
- description [string] : Confirm a date never compares as equal or ordered against an integer.
117
- on_test [script] :
118
- put '2025.06.01' into ^^.late_date
113
+ confirm_date_vs_integer_is_false [test] :
114
+ description [string] : Confirm a date never compares as equal or ordered against an integer.
115
+ on_test [script] :
116
+ put '2025.06.01' into ^^.late_date
119
117
 
120
- eval ^^.late_date > 5
121
- refute "expected date > integer to be false"
118
+ eval ^^.late_date > 5
119
+ refute "expected date > integer to be false"
122
120
 
123
- eval ^^.late_date = 5
124
- refute "expected date = integer to be false"
121
+ eval ^^.late_date = 5
122
+ refute "expected date = integer to be false"
@@ -2,62 +2,60 @@
2
2
  # Exception handling tests (on_exception / throw)
3
3
  #
4
4
 
5
- tests [can] :
6
- lang [can] :
7
- exceptions [can] :
5
+ tests.lang.exceptions [can] :
8
6
 
9
- exc_fired [bool] : false
10
- err_fired [bool] : false
7
+ exc_fired [bool] : false
8
+ err_fired [bool] : false
11
9
 
12
- on_exception [script] :
13
- put true into ^.exc_fired
10
+ on_exception [script] :
11
+ put true into ^.exc_fired
14
12
 
15
- on_error [script] :
16
- put true into ^.err_fired
13
+ on_error [script] :
14
+ put true into ^.err_fired
17
15
 
18
- exception_data [can] :
19
- message [string] :
20
- backtrace [string] :
16
+ exception_data [can] :
17
+ message [string] :
18
+ backtrace [string] :
21
19
 
22
- error_data [can] :
23
- message [string] :
24
- backtrace [string] :
20
+ error_data [can] :
21
+ message [string] :
22
+ backtrace [string] :
25
23
 
26
- confirm_throw_fires_on_exception [test] :
27
- description [string] : Confirm throw fires on_exception and populates exception_data, but does not fire on_error.
28
- on_test [script] :
29
- put false into ^^.exc_fired
30
- put false into ^^.err_fired
24
+ confirm_throw_fires_on_exception [test] :
25
+ description [string] : Confirm throw fires on_exception and populates exception_data, but does not fire on_error.
26
+ on_test [script] :
27
+ put false into ^^.exc_fired
28
+ put false into ^^.err_fired
31
29
 
32
- throw "test message"
30
+ throw "test message"
33
31
 
34
- eval ^^.exc_fired = true
35
- assert "expected on_exception to have fired"
32
+ eval ^^.exc_fired = true
33
+ assert "expected on_exception to have fired"
36
34
 
37
- eval ^^.err_fired = false
38
- assert "expected on_error to NOT have fired for a thrown exception"
35
+ eval ^^.err_fired = false
36
+ assert "expected on_error to NOT have fired for a thrown exception"
39
37
 
40
- eval ^^.exception_data.message = "test message"
41
- assert "expected exception_data.message to be populated"
38
+ eval ^^.exception_data.message = "test message"
39
+ assert "expected exception_data.message to be populated"
42
40
 
43
- confirm_execution_continues_after_throw [test] :
44
- description [string] : Confirm execution continues with the next line after a throw.
45
- on_test [script] :
46
- throw "boom"
47
- eval 2 + 2
48
- eval it = 4
49
- assert "expected execution to continue after throw"
41
+ confirm_execution_continues_after_throw [test] :
42
+ description [string] : Confirm execution continues with the next line after a throw.
43
+ on_test [script] :
44
+ throw "boom"
45
+ eval 2 + 2
46
+ eval it = 4
47
+ assert "expected execution to continue after throw"
50
48
 
51
- confirm_on_error_still_works [test] :
52
- description [string] : Confirm on_error still fires for a genuine gloo-level error, independent of on_exception.
53
- on_test [script] :
54
- put false into ^^.exc_fired
55
- put false into ^^.err_fired
49
+ confirm_on_error_still_works [test] :
50
+ description [string] : Confirm on_error still fires for a genuine gloo-level error, independent of on_exception.
51
+ on_test [script] :
52
+ put false into ^^.exc_fired
53
+ put false into ^^.err_fired
56
54
 
57
- tell no_such_object_anywhere to run
55
+ tell no_such_object_anywhere to run
58
56
 
59
- eval ^^.err_fired = true
60
- assert "expected on_error to have fired for a bad path"
57
+ eval ^^.err_fired = true
58
+ assert "expected on_error to have fired for a bad path"
61
59
 
62
- eval ^^.exc_fired = false
63
- assert "expected on_exception to NOT have fired for a gloo-level error"
60
+ eval ^^.exc_fired = false
61
+ assert "expected on_exception to NOT have fired for a gloo-level error"
@@ -2,105 +2,103 @@
2
2
  # Gloo System tests
3
3
  #
4
4
 
5
- tests [can] :
6
- lang [can] :
7
- gloo_sys [can] :
8
-
9
- get_platform_info [test] :
10
- description [string] : Get the platform info.
11
- on_test [script] :
12
- eval $.platform_cpu
13
- eval it = ''
14
- refute "expected cpu to not be empty"
15
-
16
- eval $.platform_os
17
- eval it = ''
18
- refute "expected os to not be empty"
19
-
20
- eval $.platform_version
21
- eval it = ''
22
- refute "expected version to not be empty"
23
-
24
- eval $.platform_mac?
25
- eval it = ''
26
- refute "expected mac? to not be empty"
27
-
28
- get_hostname [test] :
29
- description [string] : Get the hostname.
30
- on_test [script] :
31
- eval $.hostname = ''
32
- refute "expected hostname to not be empty"
33
-
34
- get_working_dir [test] :
35
- description [string] : Get the working directory.
36
- on_test [script] :
37
- eval $.working_dir
38
- eval it = ''
39
- refute "expected working_dir to not be empty"
40
-
41
- eval $.working_dir = gloo.working_dir
42
- assert "expected gloo. and $. to be the same"
43
-
44
- get_app_dir [test] :
45
- description [string] : Get the app directory.
46
- on_test [script] :
47
- eval $.app
48
- eval it = ''
49
- refute "expected app_dir to not be empty"
50
-
51
- get_user_info [test] :
52
- description [string] : Get the user directories.
53
- on_test [script] :
54
- eval $.user_home
55
- eval it = ''
56
- refute "expected user_home to not be empty"
57
-
58
- eval $.user
59
- eval it = ''
60
- refute "expected user to not be empty"
61
-
62
- get_gloo_dirs [test] :
63
- description [string] : Get the gloo directories.
64
- on_test [script] :
65
- eval $.gloo_home
66
- eval it = ''
67
- refute "expected gloo_home to not be empty"
68
-
69
- eval $.gloo_config
70
- eval it = ''
71
- refute "expected gloo_config to not be empty"
72
-
73
- eval $.gloo_projects
74
- eval it = ''
75
- refute "expected gloo_projects to not be empty"
76
-
77
- eval $.gloo_log
78
- eval it = ''
79
- refute "expected gloo_log to not be empty"
80
-
81
- get_screen_dims [test] :
82
- description [string] : Get the screen dimensions.
83
- i [int] :
84
- on_test [script] :
85
- put $.screen_lines into ^.i
86
- eval ^.i > 0
87
- assert "expected screen_lines to be greater than 0"
88
-
89
- put $.screen_cols into ^.i
90
- eval ^.i > 0
91
- assert "expected screen_cols to be greater than 0"
92
-
93
- get_platform_os [test] :
94
- description [string] : Get the platform OS.
95
- on_test [script] :
96
- eval $.platform_mac? = true
97
- assert "expected platform_mac to be true"
98
-
99
- eval $.platform_windows? = false
100
- assert "expected platform_windows to be false"
101
-
102
- eval $.platform_linux? = false
103
- assert "expected platform_linux to be false"
104
-
105
- eval $.platform_wsl? = false
106
- assert "expected platform_wsl to be false"
5
+ tests.lang.gloo_sys [can] :
6
+
7
+ get_platform_info [test] :
8
+ description [string] : Get the platform info.
9
+ on_test [script] :
10
+ eval $.platform_cpu
11
+ eval it = ''
12
+ refute "expected cpu to not be empty"
13
+
14
+ eval $.platform_os
15
+ eval it = ''
16
+ refute "expected os to not be empty"
17
+
18
+ eval $.platform_version
19
+ eval it = ''
20
+ refute "expected version to not be empty"
21
+
22
+ eval $.platform_mac?
23
+ eval it = ''
24
+ refute "expected mac? to not be empty"
25
+
26
+ get_hostname [test] :
27
+ description [string] : Get the hostname.
28
+ on_test [script] :
29
+ eval $.hostname = ''
30
+ refute "expected hostname to not be empty"
31
+
32
+ get_working_dir [test] :
33
+ description [string] : Get the working directory.
34
+ on_test [script] :
35
+ eval $.working_dir
36
+ eval it = ''
37
+ refute "expected working_dir to not be empty"
38
+
39
+ eval $.working_dir = gloo.working_dir
40
+ assert "expected gloo. and $. to be the same"
41
+
42
+ get_app_dir [test] :
43
+ description [string] : Get the app directory.
44
+ on_test [script] :
45
+ eval $.app
46
+ eval it = ''
47
+ refute "expected app_dir to not be empty"
48
+
49
+ get_user_info [test] :
50
+ description [string] : Get the user directories.
51
+ on_test [script] :
52
+ eval $.user_home
53
+ eval it = ''
54
+ refute "expected user_home to not be empty"
55
+
56
+ eval $.user
57
+ eval it = ''
58
+ refute "expected user to not be empty"
59
+
60
+ get_gloo_dirs [test] :
61
+ description [string] : Get the gloo directories.
62
+ on_test [script] :
63
+ eval $.gloo_home
64
+ eval it = ''
65
+ refute "expected gloo_home to not be empty"
66
+
67
+ eval $.gloo_config
68
+ eval it = ''
69
+ refute "expected gloo_config to not be empty"
70
+
71
+ eval $.gloo_projects
72
+ eval it = ''
73
+ refute "expected gloo_projects to not be empty"
74
+
75
+ eval $.gloo_log
76
+ eval it = ''
77
+ refute "expected gloo_log to not be empty"
78
+
79
+ get_screen_dims [test] :
80
+ description [string] : Get the screen dimensions.
81
+ i [int] :
82
+ on_test [script] :
83
+ put $.screen_lines into ^.i
84
+ eval ^.i > 0
85
+ assert "expected screen_lines to be greater than 0"
86
+
87
+ put $.screen_cols into ^.i
88
+ eval ^.i > 0
89
+ assert "expected screen_cols to be greater than 0"
90
+
91
+ get_platform_os [test] :
92
+ description [string] : Get the platform OS.
93
+ on_test [script] :
94
+ eval $.platform_mac? = true
95
+ assert "expected platform_mac to be true"
96
+
97
+ eval $.platform_windows? = false
98
+ assert "expected platform_windows to be false"
99
+
100
+ eval $.platform_linux? = false
101
+ assert "expected platform_linux to be false"
102
+
103
+ eval $.platform_wsl? = false
104
+ assert "expected platform_wsl to be false"
@@ -5,37 +5,35 @@
5
5
  # parent, ^^^ its grandparent, and so on.
6
6
  #
7
7
 
8
- tests [can] :
9
- lang [can] :
10
- here [can] :
11
-
12
- s [string] : level 0
13
-
14
- r1 [string] :
15
- r2 [string] :
16
- r3 [string] :
17
-
18
- a [can] :
19
- s [string] : level 1
20
- b [can] :
21
- s [string] : level 2
22
- c [can] :
23
- s [string] : level 3
24
- capture [script] :
25
- put ^.s into tests.lang.here.r1
26
- put ^^.s into tests.lang.here.r2
27
- put ^^^.s into tests.lang.here.r3
28
-
29
- caret_walks_up_the_tree [test] :
30
- description [string] : ^, ^^, ^^^ resolve relative to the running script's location.
31
- on_test [script] :
32
- tell tests.lang.here.a.b.c.capture to run
33
-
34
- eval ^^.r1 = 'level 3'
35
- assert "expected ^ to be the script's own container"
36
-
37
- eval ^^.r2 = 'level 2'
38
- assert "expected ^^ to be the parent container"
39
-
40
- eval ^^.r3 = 'level 1'
41
- assert "expected ^^^ to be the grandparent container"
8
+ tests.lang.here [can] :
9
+
10
+ s [string] : level 0
11
+
12
+ r1 [string] :
13
+ r2 [string] :
14
+ r3 [string] :
15
+
16
+ a [can] :
17
+ s [string] : level 1
18
+ b [can] :
19
+ s [string] : level 2
20
+ c [can] :
21
+ s [string] : level 3
22
+ capture [script] :
23
+ put ^.s into tests.lang.here.r1
24
+ put ^^.s into tests.lang.here.r2
25
+ put ^^^.s into tests.lang.here.r3
26
+
27
+ caret_walks_up_the_tree [test] :
28
+ description [string] : ^, ^^, ^^^ resolve relative to the running script's location.
29
+ on_test [script] :
30
+ tell tests.lang.here.a.b.c.capture to run
31
+
32
+ eval ^^.r1 = 'level 3'
33
+ assert "expected ^ to be the script's own container"
34
+
35
+ eval ^^.r2 = 'level 2'
36
+ assert "expected ^^ to be the parent container"
37
+
38
+ eval ^^.r3 = 'level 1'
39
+ assert "expected ^^^ to be the grandparent container"