Skip to content

Commit 0d4ef29

Browse files
committed
Add tests for config syntax.
1 parent 023fd9e commit 0d4ef29

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
function test:
3+
trigger:
4+
assert a new config exists
5+
set {var} to a new config
6+
assert {var} exists
7+
assert {var} is an object
8+
delete hello.csk
9+
return true
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
function test:
3+
trigger:
4+
assert hello.csk exists
5+
set {config} to hello.csk:
6+
add "hello: there" to {config}
7+
assert {config} exists
8+
delete {config}
9+
delete hello.csk
10+
return true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
function test:
3+
trigger:
4+
assert hello.csk exists
5+
set {config} to hello.csk:
6+
add "hello: there" to {config}
7+
assert "hello" from config {config} is "there"
8+
set {var} to "hello" from config {config}
9+
assert {var} is a string
10+
assert {var} is "there"
11+
assert {config} exists
12+
delete {config}
13+
delete hello.csk
14+
return true
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
function test:
3+
trigger:
4+
assert hello.csk exists
5+
set {config} to hello.csk
6+
add "hello: there" to {config}
7+
save config {config} to hello2.csk
8+
set {config} to hello2.csk
9+
assert "hello" from config {config} is "there"
10+
delete hello2.csk
11+
delete hello.csk
12+
return true

0 commit comments

Comments
 (0)