gloo 6.4.0 → 6.5.1
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/docs/application.md +9 -0
- data/docs/language_objects.md +40 -0
- data/docs/objects.md +1 -1
- data/docs/verbs.md +9 -0
- data/lib/VERSION +1 -1
- data/lib/VERSION_NOTES +11 -0
- data/lib/gloo/app/engine.rb +5 -1
- data/lib/gloo/app/log.rb +5 -5
- data/lib/gloo/app/settings.rb +4 -1
- data/lib/gloo/core/obj.rb +21 -1
- data/lib/gloo/persist/file_loader.rb +7 -0
- data/lib/gloo/persist/persist_man.rb +35 -3
- data/lib/gloo/persist/source/obj_node.rb +41 -0
- data/lib/gloo/verbs/list.rb +24 -2
- data/lib/gloo/verbs/load.rb +13 -2
- data/test.gloo/ctrl/each.test.gloo +28 -30
- data/test.gloo/dt/date.test.gloo +69 -71
- data/test.gloo/dt/datetime.test.gloo +55 -57
- data/test.gloo/dt/time.test.gloo +70 -72
- data/test.gloo/lang/continuation.test.gloo +25 -27
- data/test.gloo/lang/convert.test.gloo +50 -52
- data/test.gloo/lang/dt_comparisons.test.gloo +87 -89
- data/test.gloo/lang/exceptions.test.gloo +42 -44
- data/test.gloo/lang/gloo_sys.test.gloo +100 -102
- data/test.gloo/lang/here.test.gloo +32 -34
- data/test.gloo/lang/it.test.gloo +27 -29
- data/test.gloo/lang/literal.test.gloo +55 -57
- data/test.gloo/lang/load_lib_directive.test.gloo +18 -20
- data/test.gloo/lang/naming.test.gloo +28 -30
- data/test.gloo/lang/ops.test.gloo +53 -55
- data/test.gloo/lang/shorthand.test.gloo +15 -17
- data/test.gloo/math/add.test.gloo +40 -42
- data/test.gloo/math/div.test.gloo +23 -25
- data/test.gloo/math/mult.test.gloo +23 -25
- data/test.gloo/math/sub.test.gloo +23 -25
- data/test.gloo/objs/alias.test.gloo +15 -17
- data/test.gloo/objs/bool.test.gloo +54 -56
- data/test.gloo/objs/can.test.gloo +33 -35
- data/test.gloo/objs/cipher.test.gloo +39 -41
- data/test.gloo/objs/decimal.test.gloo +27 -29
- data/test.gloo/objs/erb.test.gloo +47 -49
- data/test.gloo/objs/file.test.gloo +68 -70
- data/test.gloo/objs/function.test.gloo +37 -39
- data/test.gloo/objs/int.test.gloo +54 -56
- data/test.gloo/objs/json.test.gloo +56 -58
- data/test.gloo/objs/obj.test.gloo +68 -48
- data/test.gloo/objs/outline.test.gloo +48 -50
- data/test.gloo/objs/password.test.gloo +34 -36
- data/test.gloo/objs/repeat.test.gloo +42 -44
- data/test.gloo/objs/script.test.gloo +13 -15
- data/test.gloo/objs/string.test.gloo +82 -84
- data/test.gloo/objs/text.test.gloo +90 -92
- data/test.gloo/objs/untyped.test.gloo +36 -38
- data/test.gloo/objs/uri.test.gloo +37 -39
- data/test.gloo/verbs/break.test.gloo +12 -14
- data/test.gloo/verbs/check.test.gloo +22 -24
- data/test.gloo/verbs/context.test.gloo +11 -13
- data/test.gloo/verbs/create.test.gloo +7 -9
- data/test.gloo/verbs/eval.test.gloo +10 -12
- data/test.gloo/verbs/exists.test.gloo +43 -45
- data/test.gloo/verbs/if.test.gloo +8 -10
- data/test.gloo/verbs/invoke.test.gloo +73 -75
- data/test.gloo/verbs/list.test.gloo +21 -23
- data/test.gloo/verbs/load.test.gloo +27 -21
- data/test.gloo/verbs/log.test.gloo +7 -9
- data/test.gloo/verbs/move.test.gloo +12 -14
- data/test.gloo/verbs/put.test.gloo +10 -12
- data/test.gloo/verbs/reload.test.gloo +30 -32
- data/test.gloo/verbs/run.test.gloo +8 -10
- data/test.gloo/verbs/save.test.gloo +90 -94
- data/test.gloo/verbs/show.test.gloo +26 -28
- data/test.gloo/verbs/tell.test.gloo +8 -10
- data/test.gloo/verbs/throw.test.gloo +31 -33
- data/test.gloo/verbs/unless.test.gloo +13 -15
- data/test.gloo/verbs/unload.test.gloo +10 -12
- metadata +1 -1
|
@@ -2,104 +2,102 @@
|
|
|
2
2
|
# Text tests
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
-
tests [can] :
|
|
6
|
-
objs [can] :
|
|
7
|
-
text [can] :
|
|
5
|
+
tests.objs.text [can] :
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
a [text] : BEGIN
|
|
10
8
|
one
|
|
11
9
|
two
|
|
12
10
|
three 3 tree
|
|
13
11
|
END
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
# inside a block every line is literal - '#' lines and blank
|
|
14
|
+
# lines are kept, not treated as comments/blanks
|
|
15
|
+
hashed [text] : BEGIN
|
|
18
16
|
# a heading
|
|
19
17
|
|
|
20
18
|
- a list item
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
19
|
+
END
|
|
20
|
+
|
|
21
|
+
b [string] :
|
|
22
|
+
|
|
23
|
+
verify_text [test] :
|
|
24
|
+
description [string] : Verify the content of the text
|
|
25
|
+
on_test [script] :
|
|
26
|
+
put ^^.a into ^^.b
|
|
27
|
+
check ^^.b for starts_with? (" one")
|
|
28
|
+
assert "expected it to be true"
|
|
29
|
+
|
|
30
|
+
blank [test] :
|
|
31
|
+
description [string] : Check to see if the text is blank
|
|
32
|
+
on_test [script] :
|
|
33
|
+
put '' into ^^.b
|
|
34
|
+
check ^^.b for blank?
|
|
35
|
+
assert "expected text to be blank?"
|
|
36
|
+
|
|
37
|
+
put 'abc' into ^^.b
|
|
38
|
+
check ^^.b for blank?
|
|
39
|
+
refute "expected text to not be blank?"
|
|
40
|
+
|
|
41
|
+
length [test] :
|
|
42
|
+
description [string] : Get the length of the string
|
|
43
|
+
on_test [script] :
|
|
44
|
+
put 'hello' into ^^.b
|
|
45
|
+
tell ^^.b to size
|
|
46
|
+
eval it = 5
|
|
47
|
+
assert "expected length to be 5"
|
|
48
|
+
|
|
49
|
+
count_chars [test] :
|
|
50
|
+
description [string] : Get the number of characters
|
|
51
|
+
on_test [script] :
|
|
52
|
+
put 'hello world' into ^^.b
|
|
53
|
+
tell ^^.b to count_chars
|
|
54
|
+
eval it = 11
|
|
55
|
+
assert "expected text to have 11 characters"
|
|
56
|
+
|
|
57
|
+
count_words [test] :
|
|
58
|
+
description [string] : Get the number of words
|
|
59
|
+
on_test [script] :
|
|
60
|
+
tell ^^.a to count_words
|
|
61
|
+
eval it = 5
|
|
62
|
+
assert "expected text to have 5 words"
|
|
63
|
+
|
|
64
|
+
count_lines [test] :
|
|
65
|
+
description [string] : Get the number of lines
|
|
66
|
+
on_test [script] :
|
|
67
|
+
tell ^^.a to count_lines
|
|
68
|
+
eval it = 3
|
|
69
|
+
assert "expected text to have 3 lines"
|
|
70
|
+
|
|
71
|
+
block_keeps_hash_and_blank_lines [test] :
|
|
72
|
+
description [string] : a BEGIN/END block keeps '#' lines and blank lines verbatim
|
|
73
|
+
on_test [script] :
|
|
74
|
+
check ^^.hashed for substring? ( "# a heading" )
|
|
75
|
+
assert "expected the '#' line to be kept, not stripped as a comment"
|
|
76
|
+
|
|
77
|
+
check ^^.hashed for substring? ( "- a list item" )
|
|
78
|
+
assert "expected content after the blank line to be kept"
|
|
79
|
+
|
|
80
|
+
tell ^^.hashed to count_lines
|
|
81
|
+
eval it = 3
|
|
82
|
+
assert "expected 3 lines: heading, blank, list item"
|
|
83
|
+
|
|
84
|
+
starts_with [test] :
|
|
85
|
+
description [string] : Check if the string starts with a value
|
|
86
|
+
on_test [script] :
|
|
87
|
+
put 'hello' into ^^.b
|
|
88
|
+
tell ^^.b to starts_with? ('he')
|
|
89
|
+
assert "expected it to be true that it starts with 'he'"
|
|
90
|
+
|
|
91
|
+
ends_with [test] :
|
|
92
|
+
description [string] : Check if the string ends with a value
|
|
93
|
+
on_test [script] :
|
|
94
|
+
put 'hello' into ^^.b
|
|
95
|
+
tell ^^.b to ends_with? ('lo')
|
|
96
|
+
assert "expected it to be true that it ends with 'lo'"
|
|
97
|
+
|
|
98
|
+
contains [test] :
|
|
99
|
+
description [string] : Check if the string contains a value
|
|
100
|
+
on_test [script] :
|
|
101
|
+
put 'hello world' into ^^.b
|
|
102
|
+
tell ^^.b to substring? ('lo w')
|
|
103
|
+
assert "expected it to be true that it contains 'lo w'"
|
|
@@ -2,42 +2,40 @@
|
|
|
2
2
|
# Untyped object tests
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
-
tests [can] :
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
check ^^.a for responds_to? ( "up" )
|
|
42
|
-
refute "expected an untyped object to not respond to 'up'"
|
|
5
|
+
tests.objs.untyped [can] :
|
|
6
|
+
|
|
7
|
+
a [any] :
|
|
8
|
+
|
|
9
|
+
test_untyped [test] :
|
|
10
|
+
description [string] : Test untyped with different values
|
|
11
|
+
on_test [script] :
|
|
12
|
+
put "hello" into ^^.a
|
|
13
|
+
eval ^^.a = "hello"
|
|
14
|
+
assert "expected it to be hello"
|
|
15
|
+
|
|
16
|
+
put 123 into ^^.a
|
|
17
|
+
eval ^^.a = 123
|
|
18
|
+
assert "expected it to be 123"
|
|
19
|
+
|
|
20
|
+
put true into ^^.a
|
|
21
|
+
eval ^^.a = true
|
|
22
|
+
assert "expected it to be true"
|
|
23
|
+
|
|
24
|
+
base_messages_work [test] :
|
|
25
|
+
description [string] : an untyped object still receives the base object messages
|
|
26
|
+
on_test [script] :
|
|
27
|
+
put "" into ^^.a
|
|
28
|
+
check ^^.a for blank?
|
|
29
|
+
assert "expected an empty untyped object to be blank"
|
|
30
|
+
|
|
31
|
+
put "x" into ^^.a
|
|
32
|
+
check ^^.a for blank?
|
|
33
|
+
refute "expected a non-empty untyped object to not be blank"
|
|
34
|
+
|
|
35
|
+
type_messages_do_not [test] :
|
|
36
|
+
description [string] : an untyped object does not receive type-specific messages
|
|
37
|
+
on_test [script] :
|
|
38
|
+
put "hello" into ^^.a
|
|
39
|
+
check ^^.a for responds_to? ( "up" )
|
|
40
|
+
refute "expected an untyped object to not respond to 'up'"
|
|
43
41
|
|
|
@@ -2,42 +2,40 @@
|
|
|
2
2
|
# URI object tests
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
-
tests [can] :
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
result [string] :
|
|
5
|
+
tests.objs.uri [can] :
|
|
6
|
+
|
|
7
|
+
link [uri] : https://example.com:8443/docs/guide?page=3&sort=asc#install
|
|
8
|
+
bare [uri] : https://example.com
|
|
9
|
+
|
|
10
|
+
parts_of_a_url [test] :
|
|
11
|
+
description [string] : the get_ messages pull each piece of the URL into it.
|
|
12
|
+
on_test [script] :
|
|
13
|
+
tell ^^.link to get_scheme
|
|
14
|
+
eval it = 'https'
|
|
15
|
+
assert "expected scheme https"
|
|
16
|
+
|
|
17
|
+
tell ^^.link to get_host
|
|
18
|
+
eval it = 'example.com'
|
|
19
|
+
assert "expected host example.com (no port)"
|
|
20
|
+
|
|
21
|
+
tell ^^.link to get_path
|
|
22
|
+
eval it = '/docs/guide'
|
|
23
|
+
assert "expected path /docs/guide"
|
|
24
|
+
|
|
25
|
+
tell ^^.link to get_query
|
|
26
|
+
eval it = 'page=3&sort=asc'
|
|
27
|
+
assert "expected the query string"
|
|
28
|
+
|
|
29
|
+
tell ^^.link to get_fragment
|
|
30
|
+
eval it = 'install'
|
|
31
|
+
assert "expected fragment install"
|
|
32
|
+
|
|
33
|
+
missing_pieces [test] :
|
|
34
|
+
description [string] : a bare URL has an empty path.
|
|
35
|
+
on_test [script] :
|
|
36
|
+
tell ^^.bare to get_path
|
|
37
|
+
put it into tests.objs.uri.result
|
|
38
|
+
check tests.objs.uri.result for blank?
|
|
39
|
+
assert "expected the path of a bare URL to be blank"
|
|
40
|
+
|
|
41
|
+
result [string] :
|
|
@@ -2,21 +2,19 @@
|
|
|
2
2
|
# Break verb tests
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
-
tests [can] :
|
|
6
|
-
verbs [can] :
|
|
7
|
-
break [can] :
|
|
5
|
+
tests.verbs.break [can] :
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
b [bool] : true
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
s [script] :
|
|
10
|
+
if ^.b then break
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
# Should not get here
|
|
13
|
+
put false into ^.b
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
break [test] :
|
|
16
|
+
description [string] : Break out of a script
|
|
17
|
+
on_test [script] :
|
|
18
|
+
tell ^^.s to run
|
|
19
|
+
eval ^^.b
|
|
20
|
+
assert "expected b to be true"
|
|
@@ -2,34 +2,32 @@
|
|
|
2
2
|
# Check verb tests
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
-
tests [can] :
|
|
6
|
-
verbs [can] :
|
|
7
|
-
check [can] :
|
|
5
|
+
tests.verbs.check [can] :
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
c [container] :
|
|
8
|
+
a [string] : "a"
|
|
9
|
+
t [container] :
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
check_contains [test] :
|
|
12
|
+
description [string] : Check an object for containment
|
|
13
|
+
on_test [script] :
|
|
14
|
+
check ^^.c for contains?
|
|
15
|
+
assert "expected c to contain a"
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
check ^^.t for contains?
|
|
18
|
+
refute "expected t to not contain a"
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
check ^^.c.a for contains?
|
|
21
|
+
refute "expected a to not be a container"
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
check_blank [test] :
|
|
24
|
+
description [string] : Check an object for blankness
|
|
25
|
+
on_test [script] :
|
|
26
|
+
check ^^.c for blank?
|
|
27
|
+
refute "expected c to not be blank"
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
check ^^.t for blank?
|
|
30
|
+
assert "expected t to be blank"
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
check ^^.c.a for blank?
|
|
33
|
+
refute "expected a to not be blank"
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
# Context verb tests
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
-
tests [can] :
|
|
6
|
-
verbs [can] :
|
|
7
|
-
context [can] :
|
|
5
|
+
tests.verbs.context [can] :
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
set_context [test] :
|
|
8
|
+
description [string] : context {path} sets the context and puts the path in it.
|
|
9
|
+
on_test [script] :
|
|
10
|
+
context tests.verbs.context
|
|
11
|
+
eval it = 'tests.verbs.context'
|
|
12
|
+
assert "expected it to be the new context path"
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
# restore, so later tests run at root
|
|
15
|
+
context root
|
|
16
|
+
eval it = 'root'
|
|
17
|
+
assert "expected context to be restored to root"
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
# Create verb tests
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
-
tests [can] :
|
|
6
|
-
verbs [can] :
|
|
7
|
-
create [can] :
|
|
5
|
+
tests.verbs.create [can] :
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
create_str [test] :
|
|
8
|
+
description [string] : Create sets it to the initial value.
|
|
9
|
+
on_test [script] :
|
|
10
|
+
create cx as string : 'hello'
|
|
11
|
+
eval it = 'hello'
|
|
12
|
+
assert "expected it to equal the created value"
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
# Eval verb tests
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
-
tests [can] :
|
|
6
|
-
verbs [can] :
|
|
7
|
-
eval [can] :
|
|
5
|
+
tests.verbs.eval [can] :
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
eval_expr [test] :
|
|
8
|
+
description [string] : Evaluate an expression.
|
|
9
|
+
on_test [script] :
|
|
10
|
+
eval 1 + 1 = 2
|
|
11
|
+
assert "expected 1 + 1 to equal 2"
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
eval true
|
|
14
|
+
assert "expected true to be true"
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
eval false
|
|
17
|
+
refute "expected false to be false"
|
|
@@ -2,48 +2,46 @@
|
|
|
2
2
|
# Exists verb tests
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
-
tests [can] :
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
exists? instance tests.verbs.exists.instance2
|
|
49
|
-
refute "expected instance to not exist"
|
|
5
|
+
tests.verbs.exists [can] :
|
|
6
|
+
|
|
7
|
+
verb [test] :
|
|
8
|
+
description [string] : Check on existance of exists verb
|
|
9
|
+
on_test [script] :
|
|
10
|
+
exists? verb exists?
|
|
11
|
+
assert "expected exists? to exist"
|
|
12
|
+
|
|
13
|
+
exists? verb does_not_exist
|
|
14
|
+
refute "expected does_not_exist to not exist"
|
|
15
|
+
|
|
16
|
+
object [test] :
|
|
17
|
+
description [string] : Check on existance of exists object type
|
|
18
|
+
on_test [script] :
|
|
19
|
+
exists? object container
|
|
20
|
+
assert "expected container to exist"
|
|
21
|
+
|
|
22
|
+
exists? object can
|
|
23
|
+
assert "expected can to exist"
|
|
24
|
+
|
|
25
|
+
exists? object does_not_exist
|
|
26
|
+
refute "expected does_not_exist to not exist"
|
|
27
|
+
|
|
28
|
+
any_v_or_o [test] :
|
|
29
|
+
description [string] : Check on existance of any type
|
|
30
|
+
on_test [script] :
|
|
31
|
+
exists? str
|
|
32
|
+
assert "expected str to exist"
|
|
33
|
+
|
|
34
|
+
exists? show
|
|
35
|
+
assert "expected show to exist"
|
|
36
|
+
|
|
37
|
+
exists? does_not_exist
|
|
38
|
+
refute "expected does_not_exist to not exist"
|
|
39
|
+
|
|
40
|
+
instance [test] :
|
|
41
|
+
description [string] : Check on existance of objects.
|
|
42
|
+
on_test [script] :
|
|
43
|
+
exists? instance tests.verbs.exists.instance
|
|
44
|
+
assert "expected instance to exist"
|
|
45
|
+
|
|
46
|
+
exists? instance tests.verbs.exists.instance2
|
|
47
|
+
refute "expected instance to not exist"
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
# If verb tests
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
-
tests [can] :
|
|
6
|
-
verbs [can] :
|
|
7
|
-
if [can] :
|
|
5
|
+
tests.verbs.if [can] :
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
b [bool] : true
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
if_test [test] :
|
|
10
|
+
description [string] : If true then evaluate
|
|
11
|
+
on_test [script] :
|
|
12
|
+
eval false
|
|
13
|
+
if ^^.b then eval true
|
|
14
|
+
assert "expected b to be true"
|