gloo 7.1.3 → 7.3
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.
- checksums.yaml +4 -4
- data/Rakefile +23 -0
- data/docs/application.md +65 -4
- data/docs/development.md +10 -0
- data/docs/iterators.md +66 -1
- data/docs/language_objects.md +34 -22
- data/docs/language_scripting.md +23 -2
- data/docs/language_syntax.md +86 -3
- data/docs/objects.md +6 -6
- data/docs/operators.md +36 -2
- data/docs/plugins.md +26 -0
- data/docs/testing.md +35 -9
- data/docs/verbs.md +31 -3
- data/lib/VERSION +1 -1
- data/lib/VERSION_NOTES +23 -0
- data/lib/dependencies.rb +4 -1
- data/lib/gloo/app/engine.rb +151 -23
- data/lib/gloo/app/prompt.rb +8 -0
- data/lib/gloo/convert/string_to_decimal.rb +3 -6
- data/lib/gloo/convert/string_to_integer.rb +3 -2
- data/lib/gloo/core/dictionary.rb +23 -12
- data/lib/gloo/core/obj.rb +77 -23
- data/lib/gloo/core/op.rb +99 -0
- data/lib/gloo/core/parser.rb +15 -0
- data/lib/gloo/core/tokens.rb +18 -0
- data/lib/gloo/core/verb.rb +130 -1
- data/lib/gloo/exec/dispatch.rb +7 -3
- data/lib/gloo/exec/runaway_recursion.rb +34 -0
- data/lib/gloo/exec/runner.rb +46 -0
- data/lib/gloo/exec/script.rb +16 -2
- data/lib/gloo/expr/expression.rb +77 -6
- data/lib/gloo/expr/l_decimal.rb +18 -2
- data/lib/gloo/expr/l_integer.rb +5 -2
- data/lib/gloo/expr/op_div.rb +4 -0
- data/lib/gloo/expr/op_eq.rb +4 -0
- data/lib/gloo/expr/op_gt.rb +4 -0
- data/lib/gloo/expr/op_gteq.rb +4 -0
- data/lib/gloo/expr/op_ineq.rb +4 -0
- data/lib/gloo/expr/op_lt.rb +4 -0
- data/lib/gloo/expr/op_lteq.rb +4 -0
- data/lib/gloo/expr/op_minus.rb +4 -0
- data/lib/gloo/expr/op_mult.rb +3 -7
- data/lib/gloo/expr/op_plus.rb +8 -1
- data/lib/gloo/objs/basic/alias.rb +6 -1
- data/lib/gloo/objs/basic/boolean.rb +15 -6
- data/lib/gloo/objs/basic/decimal.rb +25 -3
- data/lib/gloo/objs/basic/script.rb +3 -24
- data/lib/gloo/objs/basic/string_msgs.rb +50 -68
- data/lib/gloo/objs/ctrl/until.rb +219 -0
- data/lib/gloo/persist/declaration_ledger.rb +9 -9
- data/lib/gloo/persist/declaration_writer.rb +208 -0
- data/lib/gloo/persist/disc_mech.rb +70 -39
- data/lib/gloo/persist/file_loader.rb +125 -66
- data/lib/gloo/persist/file_saver.rb +130 -198
- data/lib/gloo/persist/file_storage.rb +15 -4
- data/lib/gloo/persist/file_style.rb +89 -0
- data/lib/gloo/persist/line_splitter.rb +16 -1
- data/lib/gloo/persist/persist_man.rb +112 -30
- data/lib/gloo/persist/save_index.rb +211 -0
- data/lib/gloo/persist/script_body_collector.rb +16 -21
- data/lib/gloo/persist/source/blank_node.rb +10 -3
- data/lib/gloo/persist/source/comment_node.rb +10 -2
- data/lib/gloo/persist/source/directive_node.rb +10 -2
- data/lib/gloo/persist/source/obj_node.rb +174 -9
- data/lib/gloo/persist/source/source_doc.rb +54 -0
- data/lib/gloo/persist/subtree_extractor.rb +9 -37
- data/lib/gloo/persist/trivia_buffer.rb +7 -7
- data/lib/gloo/plugin/callback.rb +54 -10
- data/lib/gloo/plugin/ext_manager.rb +44 -0
- data/lib/gloo/plugin/lib_manager.rb +65 -1
- data/lib/gloo/shell/runner.rb +36 -9
- data/lib/gloo/verbs/break.rb +6 -4
- data/lib/gloo/verbs/check.rb +8 -2
- data/lib/gloo/verbs/create.rb +13 -4
- data/lib/gloo/verbs/if.rb +33 -10
- data/lib/gloo/verbs/invoke.rb +6 -1
- data/lib/gloo/verbs/list.rb +9 -2
- data/lib/gloo/verbs/load.rb +31 -22
- data/lib/gloo/verbs/move.rb +50 -5
- data/lib/gloo/verbs/put.rb +9 -2
- data/lib/gloo/verbs/reload.rb +2 -1
- data/lib/gloo/verbs/run.rb +8 -1
- data/lib/gloo/verbs/save.rb +30 -4
- data/lib/gloo/verbs/tell.rb +9 -2
- data/lib/gloo/verbs/unless.rb +34 -10
- data/lib/gloo/verbs/unload.rb +81 -16
- data/test.gloo/app/exit_status.test.gloo +34 -0
- data/test.gloo/app/fixtures/exit_after_error.gloo +9 -0
- data/test.gloo/ctrl/until.test.gloo +100 -0
- data/test.gloo/lang/computed_paths.test.gloo +98 -0
- data/test.gloo/lang/declaration.test.gloo +36 -0
- data/test.gloo/lang/fixtures/mixed_indent.gloo +5 -0
- data/test.gloo/lang/literal.test.gloo +43 -0
- data/test.gloo/lang/naming.test.gloo +44 -6
- data/test.gloo/lang/ops.test.gloo +193 -0
- data/test.gloo/lang/runaway_recursion.test.gloo +44 -0
- data/test.gloo/objs/decimal.test.gloo +23 -0
- data/test.gloo/objs/string.test.gloo +30 -0
- data/test.gloo/verbs/create.test.gloo +6 -21
- data/test.gloo/verbs/fixtures/load_beside.gloo +6 -0
- data/test.gloo/verbs/fixtures/lossless_text.gloo +7 -0
- data/test.gloo/verbs/fixtures/lossless_text_saved.gloo +9 -0
- data/test.gloo/verbs/if.test.gloo +41 -0
- data/test.gloo/verbs/load.test.gloo +22 -3
- data/test.gloo/verbs/move.test.gloo +39 -0
- data/test.gloo/verbs/save.test.gloo +239 -0
- data/test.gloo/verbs/unless.test.gloo +40 -0
- data/test.gloo/verbs/unload.test.gloo +61 -3
- metadata +15 -1
|
@@ -222,3 +222,242 @@ END
|
|
|
222
222
|
assert "reload should restore the on-disk value"
|
|
223
223
|
tell demo to unload
|
|
224
224
|
tell ^^.f to delete
|
|
225
|
+
|
|
226
|
+
# -------------------------------------------------------------------
|
|
227
|
+
# Lossless save (7.2): an untouched declaration is written back
|
|
228
|
+
# exactly; a changed one changes only its own line.
|
|
229
|
+
# -------------------------------------------------------------------
|
|
230
|
+
|
|
231
|
+
body_fixture [text] : BEGIN
|
|
232
|
+
lossless_body [can] :
|
|
233
|
+
n [int] : 0
|
|
234
|
+
s [script] :
|
|
235
|
+
put 1 into ^.n
|
|
236
|
+
|
|
237
|
+
# a comment inside the body
|
|
238
|
+
put ^.n + 1 into ^.n # an inline comment
|
|
239
|
+
put ^.n + \
|
|
240
|
+
2 into ^.n
|
|
241
|
+
after [string] : after
|
|
242
|
+
END
|
|
243
|
+
|
|
244
|
+
directive_fixture [text] : BEGIN
|
|
245
|
+
#
|
|
246
|
+
# A comment block above the directive.
|
|
247
|
+
#
|
|
248
|
+
load lib yaml
|
|
249
|
+
|
|
250
|
+
lossless_lib [can] :
|
|
251
|
+
cfg [yaml] :
|
|
252
|
+
END
|
|
253
|
+
|
|
254
|
+
untyped_fixture [text] : BEGIN
|
|
255
|
+
lossless_untyped [can] :
|
|
256
|
+
plain : no type given
|
|
257
|
+
END
|
|
258
|
+
|
|
259
|
+
untyped_changed [text] : BEGIN
|
|
260
|
+
lossless_untyped [can] :
|
|
261
|
+
plain : changed
|
|
262
|
+
END
|
|
263
|
+
|
|
264
|
+
same_name_fixture [text] : BEGIN
|
|
265
|
+
lossless_same [can] :
|
|
266
|
+
a [string] : First A
|
|
267
|
+
a [string] : Second A
|
|
268
|
+
END
|
|
269
|
+
|
|
270
|
+
same_name_changed [text] : BEGIN
|
|
271
|
+
lossless_same [can] :
|
|
272
|
+
a [string] : Changed
|
|
273
|
+
a [string] : Second A
|
|
274
|
+
END
|
|
275
|
+
|
|
276
|
+
shorthand_fixture [text] : BEGIN
|
|
277
|
+
lossless_short [can] :
|
|
278
|
+
x [int] : 1
|
|
279
|
+
|
|
280
|
+
lossless_short.b [can] :
|
|
281
|
+
y [int] : 2
|
|
282
|
+
END
|
|
283
|
+
|
|
284
|
+
style_fixture [text] : BEGIN
|
|
285
|
+
lossless_style [can] :
|
|
286
|
+
n [int] : 1
|
|
287
|
+
END
|
|
288
|
+
|
|
289
|
+
style_changed [text] : BEGIN
|
|
290
|
+
lossless_style [can] :
|
|
291
|
+
n [int] : 1
|
|
292
|
+
k [int] : 5
|
|
293
|
+
END
|
|
294
|
+
|
|
295
|
+
# A text value's fixture has its own BEGIN/END blocks, so it can't be
|
|
296
|
+
# a text block here: it's a file beside this one.
|
|
297
|
+
text_fixture [file] :
|
|
298
|
+
text_saved [file] :
|
|
299
|
+
text_src [string] :
|
|
300
|
+
text_want [string] :
|
|
301
|
+
where [string] :
|
|
302
|
+
|
|
303
|
+
utf8_fixture [text] : BEGIN
|
|
304
|
+
# Café — ünïcödé 🎉
|
|
305
|
+
lossless_utf8 [can] :
|
|
306
|
+
greeting [string] : héllo wörld 👋
|
|
307
|
+
END
|
|
308
|
+
|
|
309
|
+
untouched_script_body_round_trips [test] :
|
|
310
|
+
description [string] : blank lines, comments and a continuation in a script body survive a save.
|
|
311
|
+
on_test [script] :
|
|
312
|
+
tell ^^.f to write ( ^^.body_fixture )
|
|
313
|
+
load ( ^^.f )
|
|
314
|
+
tell lossless_body.s to run
|
|
315
|
+
eval lossless_body.n = 4
|
|
316
|
+
assert "sanity: the body ran, continuation and all"
|
|
317
|
+
put 0 into lossless_body.n
|
|
318
|
+
save lossless_body
|
|
319
|
+
tell ^^.f to read ( ^^.out )
|
|
320
|
+
eval ^^.out = ^^.body_fixture
|
|
321
|
+
assert "expected the body exactly as written"
|
|
322
|
+
tell lossless_body to unload
|
|
323
|
+
tell ^^.f to delete
|
|
324
|
+
|
|
325
|
+
directive_stays_below_its_comments [test] :
|
|
326
|
+
description [string] : a load lib directive stays where it was written.
|
|
327
|
+
on_test [script] :
|
|
328
|
+
tell ^^.f to write ( ^^.directive_fixture )
|
|
329
|
+
load ( ^^.f )
|
|
330
|
+
save lossless_lib
|
|
331
|
+
tell ^^.f to read ( ^^.out )
|
|
332
|
+
eval ^^.out = ^^.directive_fixture
|
|
333
|
+
assert "expected the directive below the comment block"
|
|
334
|
+
tell lossless_lib to unload
|
|
335
|
+
tell ^^.f to delete
|
|
336
|
+
|
|
337
|
+
untyped_stays_untyped [test] :
|
|
338
|
+
description [string] : an untyped declaration is saved without a type, changed or not.
|
|
339
|
+
on_test [script] :
|
|
340
|
+
tell ^^.f to write ( ^^.untyped_fixture )
|
|
341
|
+
load ( ^^.f )
|
|
342
|
+
save lossless_untyped
|
|
343
|
+
tell ^^.f to read ( ^^.out )
|
|
344
|
+
eval ^^.out = ^^.untyped_fixture
|
|
345
|
+
assert "expected the untouched declaration exactly as written"
|
|
346
|
+
put 'changed' into lossless_untyped.plain
|
|
347
|
+
save lossless_untyped
|
|
348
|
+
tell ^^.f to read ( ^^.out )
|
|
349
|
+
eval ^^.out = ^^.untyped_changed
|
|
350
|
+
assert "expected only the value to change"
|
|
351
|
+
tell lossless_untyped to unload
|
|
352
|
+
tell ^^.f to delete
|
|
353
|
+
|
|
354
|
+
an_edit_changes_only_the_first_same_name_line [test] :
|
|
355
|
+
description [string] : the first declaration holds the value; a later same-name line is kept as written.
|
|
356
|
+
expect_errors [bool] : true
|
|
357
|
+
on_test [script] :
|
|
358
|
+
tell ^^.f to write ( ^^.same_name_fixture )
|
|
359
|
+
load ( ^^.f )
|
|
360
|
+
put 'Changed' into lossless_same.a
|
|
361
|
+
save lossless_same
|
|
362
|
+
tell ^^.f to read ( ^^.out )
|
|
363
|
+
eval ^^.out = ^^.same_name_changed
|
|
364
|
+
assert "expected Second A to stay"
|
|
365
|
+
tell lossless_same to unload
|
|
366
|
+
tell ^^.f to delete
|
|
367
|
+
|
|
368
|
+
a_shorthand_child_is_written_once [test] :
|
|
369
|
+
description [string] : a container plus shorthand into it saves exactly as written.
|
|
370
|
+
on_test [script] :
|
|
371
|
+
tell ^^.f to write ( ^^.shorthand_fixture )
|
|
372
|
+
load ( ^^.f )
|
|
373
|
+
save lossless_short
|
|
374
|
+
tell ^^.f to read ( ^^.out )
|
|
375
|
+
eval ^^.out = ^^.shorthand_fixture
|
|
376
|
+
assert "expected the shorthand child not to be written again"
|
|
377
|
+
tell lossless_short to unload
|
|
378
|
+
tell ^^.f to delete
|
|
379
|
+
|
|
380
|
+
a_new_child_follows_the_files_style [test] :
|
|
381
|
+
description [string] : a new object is written with the file's indentation and type spelling.
|
|
382
|
+
on_test [script] :
|
|
383
|
+
tell ^^.f to write ( ^^.style_fixture )
|
|
384
|
+
load ( ^^.f )
|
|
385
|
+
create lossless_style.k as integer : 5
|
|
386
|
+
save lossless_style
|
|
387
|
+
tell ^^.f to read ( ^^.out )
|
|
388
|
+
eval ^^.out = ^^.style_changed
|
|
389
|
+
assert "expected two spaces and [int]"
|
|
390
|
+
tell lossless_style to unload
|
|
391
|
+
tell ^^.f to delete
|
|
392
|
+
|
|
393
|
+
appending_to_text_does_not_indent_it [test] :
|
|
394
|
+
description [string] : a changed text value is written exactly, so saving it twice adds nothing.
|
|
395
|
+
on_test [script] :
|
|
396
|
+
check ^^ for source_dir
|
|
397
|
+
put it into ^^.where
|
|
398
|
+
put ^^.where '/fixtures/lossless_text.gloo' into ^^.text_fixture
|
|
399
|
+
put ^^.where '/fixtures/lossless_text_saved.gloo' into ^^.text_saved
|
|
400
|
+
tell ^^.text_fixture to read ( ^^.text_src )
|
|
401
|
+
tell ^^.text_saved to read ( ^^.text_want )
|
|
402
|
+
tell ^^.f to write ( ^^.text_src )
|
|
403
|
+
load ( ^^.f )
|
|
404
|
+
put lossless_text.log + lossless_text.entry into lossless_text.log
|
|
405
|
+
save lossless_text
|
|
406
|
+
put lossless_text.log + lossless_text.entry into lossless_text.log
|
|
407
|
+
save lossless_text
|
|
408
|
+
tell ^^.f to read ( ^^.out )
|
|
409
|
+
eval ^^.out = ^^.text_want
|
|
410
|
+
assert "expected the lines with no added indentation"
|
|
411
|
+
tell lossless_text to unload
|
|
412
|
+
tell ^^.f to delete
|
|
413
|
+
|
|
414
|
+
utf8_round_trips [test] :
|
|
415
|
+
description [string] : non-ASCII text loads and saves exactly.
|
|
416
|
+
on_test [script] :
|
|
417
|
+
tell ^^.f to write ( ^^.utf8_fixture )
|
|
418
|
+
load ( ^^.f )
|
|
419
|
+
eval lossless_utf8.greeting = 'héllo wörld 👋'
|
|
420
|
+
assert "expected the value as written"
|
|
421
|
+
save lossless_utf8
|
|
422
|
+
tell ^^.f to read ( ^^.out )
|
|
423
|
+
eval ^^.out = ^^.utf8_fixture
|
|
424
|
+
assert "expected the file exactly as written"
|
|
425
|
+
tell lossless_utf8 to unload
|
|
426
|
+
tell ^^.f to delete
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
# -------------------------------------------------------------------
|
|
430
|
+
# Where a new file saved with a relative name goes (7.2): next to
|
|
431
|
+
# the saving script's file. These scripts are declared in this
|
|
432
|
+
# file, so that's the folder this file is in.
|
|
433
|
+
# -------------------------------------------------------------------
|
|
434
|
+
|
|
435
|
+
beside_target [file] :
|
|
436
|
+
|
|
437
|
+
save_to_a_relative_name_beside_this_file [test] :
|
|
438
|
+
description [string] : save {obj} to {relative name} writes the file next to the file the script came from.
|
|
439
|
+
on_test [script] :
|
|
440
|
+
check ^^ for source_dir
|
|
441
|
+
put it '/fixtures/save_beside.gloo' into ^^.beside_target
|
|
442
|
+
create save_beside_demo as can
|
|
443
|
+
create save_beside_demo.s as string : beside
|
|
444
|
+
save save_beside_demo to fixtures/save_beside
|
|
445
|
+
check ^^.beside_target for exists?
|
|
446
|
+
assert "expected fixtures/save_beside.gloo beside this file"
|
|
447
|
+
tell ^^.beside_target to read ( ^^.out )
|
|
448
|
+
check ^^.out for substring? ( "s [string] : beside" )
|
|
449
|
+
assert "expected the saved object in the file"
|
|
450
|
+
tell save_beside_demo to unload
|
|
451
|
+
tell ^^.beside_target to delete
|
|
452
|
+
|
|
453
|
+
save_a_new_root_beside_this_file [test] :
|
|
454
|
+
description [string] : save of a top-level object with no file yet writes it next to the file the script came from.
|
|
455
|
+
on_test [script] :
|
|
456
|
+
check ^^ for source_dir
|
|
457
|
+
put it '/save_beside_root.gloo' into ^^.beside_target
|
|
458
|
+
create save_beside_root as can
|
|
459
|
+
save save_beside_root
|
|
460
|
+
check ^^.beside_target for exists?
|
|
461
|
+
assert "expected save_beside_root.gloo beside this file"
|
|
462
|
+
tell save_beside_root to unload
|
|
463
|
+
tell ^^.beside_target to delete
|
|
@@ -39,3 +39,43 @@ tests.verbs.unless [can] :
|
|
|
39
39
|
eval false
|
|
40
40
|
unless true then eval false else eval true
|
|
41
41
|
assert "expected else to run after a 'then' action"
|
|
42
|
+
|
|
43
|
+
#
|
|
44
|
+
# unless is the exact opposite of if: the [bool] rule decides.
|
|
45
|
+
#
|
|
46
|
+
s [string] :
|
|
47
|
+
ran [string] :
|
|
48
|
+
|
|
49
|
+
blank_runs_do [test] :
|
|
50
|
+
description [string] : A blank value is false, so the do block runs.
|
|
51
|
+
on_test [script] :
|
|
52
|
+
put '' into ^^.s
|
|
53
|
+
unless ^^.s do put 'do' into ^^.ran else put 'else' into ^^.ran
|
|
54
|
+
eval ^^.ran = 'do'
|
|
55
|
+
assert "expected blank to run the do block"
|
|
56
|
+
|
|
57
|
+
other_text_runs_do [test] :
|
|
58
|
+
description [string] : Text that is neither true nor false is false, with a warning, so do runs.
|
|
59
|
+
expect_errors [bool] : true
|
|
60
|
+
on_test [script] :
|
|
61
|
+
put 'abc' into ^^.s
|
|
62
|
+
unless ^^.s do put 'do' into ^^.ran else put 'else' into ^^.ran
|
|
63
|
+
eval ^^.ran = 'do'
|
|
64
|
+
assert "expected other text to run the do block"
|
|
65
|
+
|
|
66
|
+
the_text_true_runs_else [test] :
|
|
67
|
+
description [string] : The text 'true' counts as true, so else runs.
|
|
68
|
+
on_test [script] :
|
|
69
|
+
put 'true' into ^^.s
|
|
70
|
+
unless ^^.s do put 'do' into ^^.ran else put 'else' into ^^.ran
|
|
71
|
+
eval ^^.ran = 'else'
|
|
72
|
+
assert "expected the text true to run else"
|
|
73
|
+
|
|
74
|
+
failed_condition_runs_neither [test] :
|
|
75
|
+
description [string] : A condition that reports an error abandons the line; else doesn't run.
|
|
76
|
+
expect_errors [bool] : true
|
|
77
|
+
on_test [script] :
|
|
78
|
+
put '' into ^^.ran
|
|
79
|
+
unless no.such.obj do put 'do' into ^^.ran else put 'else' into ^^.ran
|
|
80
|
+
eval ^^.ran = ''
|
|
81
|
+
assert "expected neither branch to run"
|
|
@@ -19,8 +19,8 @@ tests.verbs.unload [can] :
|
|
|
19
19
|
refute "temp should be gone after unload"
|
|
20
20
|
|
|
21
21
|
#
|
|
22
|
-
# The unload verb takes no object: 'unload x'
|
|
23
|
-
# is unloaded. (If this ever regressed, it would unload the test run.)
|
|
22
|
+
# The unload verb takes no object (only lib or ext and a name): 'unload x'
|
|
23
|
+
# is an error, and nothing is unloaded. (If this ever regressed, it would unload the test run.)
|
|
24
24
|
#
|
|
25
25
|
|
|
26
26
|
tests.verbs.unload_no_object [can] :
|
|
@@ -47,8 +47,66 @@ tests.verbs.unload_no_object [can] :
|
|
|
47
47
|
eval ^^.err_fired = true
|
|
48
48
|
assert "expected unload with an object to be an error"
|
|
49
49
|
|
|
50
|
-
eval ^^.error_data.message = "unload takes
|
|
50
|
+
eval ^^.error_data.message = "unload takes nothing, or lib or ext and a name, so nothing was unloaded; to unload one object, use tell x to unload."
|
|
51
51
|
assert "expected the error to point to tell x to unload"
|
|
52
52
|
|
|
53
53
|
exists? instance tests.verbs.unload_no_object.temp
|
|
54
54
|
assert "expected temp to still be loaded"
|
|
55
|
+
|
|
56
|
+
#
|
|
57
|
+
# unload lib: a library's verbs and object types are removed, and
|
|
58
|
+
# load lib brings them back. Each test loads md again before it ends,
|
|
59
|
+
# so the other tests (and files) find it as they expect.
|
|
60
|
+
#
|
|
61
|
+
|
|
62
|
+
tests.verbs.unload_lib [can] :
|
|
63
|
+
|
|
64
|
+
name [string] : md
|
|
65
|
+
|
|
66
|
+
unload_lib_removes_its_types [test] :
|
|
67
|
+
description [string] : unload lib md removes the markdown type; load lib md brings it back.
|
|
68
|
+
on_test [script] :
|
|
69
|
+
load lib md
|
|
70
|
+
exists? object markdown
|
|
71
|
+
assert "expected markdown to be registered after load lib md"
|
|
72
|
+
|
|
73
|
+
unload lib md
|
|
74
|
+
exists? object markdown
|
|
75
|
+
refute "expected markdown to be gone after unload lib md"
|
|
76
|
+
|
|
77
|
+
load lib md
|
|
78
|
+
exists? object markdown
|
|
79
|
+
assert "expected markdown to be back after load lib md"
|
|
80
|
+
|
|
81
|
+
unload_lib_computed_name [test] :
|
|
82
|
+
description [string] : the library name can be worked out, as with load.
|
|
83
|
+
on_test [script] :
|
|
84
|
+
load lib md
|
|
85
|
+
unload lib ( ^^.name )
|
|
86
|
+
exists? object markdown
|
|
87
|
+
refute "expected unload lib ( name ) to unload md"
|
|
88
|
+
load lib md
|
|
89
|
+
|
|
90
|
+
unload_lib_in_use [test] :
|
|
91
|
+
description [string] : a library can't be unloaded while objects of its types are on the heap.
|
|
92
|
+
expect_errors [bool] : true
|
|
93
|
+
on_test [script] :
|
|
94
|
+
load lib md
|
|
95
|
+
create tests.verbs.unload_lib.doc as markdown
|
|
96
|
+
unload lib md
|
|
97
|
+
refute "expected it to be false when the library is in use"
|
|
98
|
+
|
|
99
|
+
exists? object markdown
|
|
100
|
+
assert "expected markdown to still be registered"
|
|
101
|
+
|
|
102
|
+
tell tests.verbs.unload_lib.doc to unload
|
|
103
|
+
|
|
104
|
+
unload_pinned_lib [test] :
|
|
105
|
+
description [string] : gloo-test, loaded by gloo itself for the run, can't be unloaded.
|
|
106
|
+
expect_errors [bool] : true
|
|
107
|
+
on_test [script] :
|
|
108
|
+
unload lib test
|
|
109
|
+
refute "expected it to be false for a pinned library"
|
|
110
|
+
|
|
111
|
+
exists? verb assert
|
|
112
|
+
assert "expected assert to still be registered"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gloo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.
|
|
4
|
+
version: '7.3'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Crane
|
|
@@ -334,6 +334,7 @@ files:
|
|
|
334
334
|
- lib/gloo/exec/action.rb
|
|
335
335
|
- lib/gloo/exec/dispatch.rb
|
|
336
336
|
- lib/gloo/exec/exec_env.rb
|
|
337
|
+
- lib/gloo/exec/runaway_recursion.rb
|
|
337
338
|
- lib/gloo/exec/runner.rb
|
|
338
339
|
- lib/gloo/exec/script.rb
|
|
339
340
|
- lib/gloo/exec/stack.rb
|
|
@@ -373,6 +374,7 @@ files:
|
|
|
373
374
|
- lib/gloo/objs/ctrl/each_word.rb
|
|
374
375
|
- lib/gloo/objs/ctrl/function.rb
|
|
375
376
|
- lib/gloo/objs/ctrl/repeat.rb
|
|
377
|
+
- lib/gloo/objs/ctrl/until.rb
|
|
376
378
|
- lib/gloo/objs/dt/date.rb
|
|
377
379
|
- lib/gloo/objs/dt/datetime.rb
|
|
378
380
|
- lib/gloo/objs/dt/dt_tools.rb
|
|
@@ -389,13 +391,16 @@ files:
|
|
|
389
391
|
- lib/gloo/objs/web/json.rb
|
|
390
392
|
- lib/gloo/objs/web/uri.rb
|
|
391
393
|
- lib/gloo/persist/declaration_ledger.rb
|
|
394
|
+
- lib/gloo/persist/declaration_writer.rb
|
|
392
395
|
- lib/gloo/persist/disc_mech.rb
|
|
393
396
|
- lib/gloo/persist/file_loader.rb
|
|
394
397
|
- lib/gloo/persist/file_saver.rb
|
|
395
398
|
- lib/gloo/persist/file_storage.rb
|
|
399
|
+
- lib/gloo/persist/file_style.rb
|
|
396
400
|
- lib/gloo/persist/indent_stack.rb
|
|
397
401
|
- lib/gloo/persist/line_splitter.rb
|
|
398
402
|
- lib/gloo/persist/persist_man.rb
|
|
403
|
+
- lib/gloo/persist/save_index.rb
|
|
399
404
|
- lib/gloo/persist/script_body_collector.rb
|
|
400
405
|
- lib/gloo/persist/shorthand_expander.rb
|
|
401
406
|
- lib/gloo/persist/source/blank_node.rb
|
|
@@ -443,18 +448,23 @@ files:
|
|
|
443
448
|
- lib/gloo/verbs/wait.rb
|
|
444
449
|
- lib/run.rb
|
|
445
450
|
- test.gloo/app/embed.test.gloo
|
|
451
|
+
- test.gloo/app/exit_status.test.gloo
|
|
446
452
|
- test.gloo/app/fixtures/embed_harness.rb
|
|
453
|
+
- test.gloo/app/fixtures/exit_after_error.gloo
|
|
447
454
|
- test.gloo/basic.test.gloo
|
|
448
455
|
- test.gloo/ctrl/each.test.gloo
|
|
456
|
+
- test.gloo/ctrl/until.test.gloo
|
|
449
457
|
- test.gloo/dt/date.test.gloo
|
|
450
458
|
- test.gloo/dt/datetime.test.gloo
|
|
451
459
|
- test.gloo/dt/time.test.gloo
|
|
460
|
+
- test.gloo/lang/computed_paths.test.gloo
|
|
452
461
|
- test.gloo/lang/continuation.test.gloo
|
|
453
462
|
- test.gloo/lang/convert.test.gloo
|
|
454
463
|
- test.gloo/lang/declaration.test.gloo
|
|
455
464
|
- test.gloo/lang/dt_comparisons.test.gloo
|
|
456
465
|
- test.gloo/lang/exceptions.test.gloo
|
|
457
466
|
- test.gloo/lang/failures.test.gloo
|
|
467
|
+
- test.gloo/lang/fixtures/mixed_indent.gloo
|
|
458
468
|
- test.gloo/lang/gloo_sys.test.gloo
|
|
459
469
|
- test.gloo/lang/here.test.gloo
|
|
460
470
|
- test.gloo/lang/it.test.gloo
|
|
@@ -462,6 +472,7 @@ files:
|
|
|
462
472
|
- test.gloo/lang/load_lib_directive.test.gloo
|
|
463
473
|
- test.gloo/lang/naming.test.gloo
|
|
464
474
|
- test.gloo/lang/ops.test.gloo
|
|
475
|
+
- test.gloo/lang/runaway_recursion.test.gloo
|
|
465
476
|
- test.gloo/lang/shorthand.test.gloo
|
|
466
477
|
- test.gloo/math/add.test.gloo
|
|
467
478
|
- test.gloo/math/div.test.gloo
|
|
@@ -495,6 +506,9 @@ files:
|
|
|
495
506
|
- test.gloo/verbs/create.test.gloo
|
|
496
507
|
- test.gloo/verbs/eval.test.gloo
|
|
497
508
|
- test.gloo/verbs/exists.test.gloo
|
|
509
|
+
- test.gloo/verbs/fixtures/load_beside.gloo
|
|
510
|
+
- test.gloo/verbs/fixtures/lossless_text.gloo
|
|
511
|
+
- test.gloo/verbs/fixtures/lossless_text_saved.gloo
|
|
498
512
|
- test.gloo/verbs/if.test.gloo
|
|
499
513
|
- test.gloo/verbs/invoke.test.gloo
|
|
500
514
|
- test.gloo/verbs/list.test.gloo
|