-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdata_types.feature
42 lines (39 loc) · 1.06 KB
/
data_types.feature
1
2
3
4
5
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
Feature: Data types
Scenario: Use number literals
Given a file named "main.cloe" with:
"""
(let x 123)
(let x -456)
(let x 123.456)
(let x -456.789)
(let x 0xDEADBEEF)
(let x 01234567)
"""
Then I successfully run `cloe main.cloe`
Scenario: Use string literals
Given a file named "main.cloe" with:
"""
(let x "foo")
(let x "Hello, world!")
(let x "My name is Bob.\nYour name is not Bob.")
(let x "Job:\tProgrammer?")
"""
Then I successfully run `cloe main.cloe`
Scenario: Expand dictionaries into a dictionary
Given a file named "main.cloe" with:
"""
(print (@ {"foo" 123 ..{"bar" 456} ..{42 2049} ..{nil true true false}} 42))
"""
When I successfully run `cloe main.cloe`
Then the stdout should contain exactly "2049"
Scenario: Use a newline character in a string
Given a file named "main.cloe" with:
"""
(print "Hello,\nworld!")
"""
When I successfully run `cloe main.cloe`
Then the stdout should contain exactly:
"""
Hello,
world!
"""