-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcomparison.feature
40 lines (36 loc) · 1.08 KB
/
comparison.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
Feature: Comparison
Scenario: Use < operator
Given a file named "main.cloe" with:
"""
(print (if (< 1 2 3) "OK" "Not OK"))
"""
When I successfully run `cloe main.cloe`
Then the stdout should contain exactly "OK"
Scenario: Use <= operator
Given a file named "main.cloe" with:
"""
(print (if (<= 1 1 3) "OK" "Not OK"))
"""
When I successfully run `cloe main.cloe`
Then the stdout should contain exactly "OK"
Scenario: Use > operator
Given a file named "main.cloe" with:
"""
(print (if (> 3 2 1) "OK" "Not OK"))
"""
When I successfully run `cloe main.cloe`
Then the stdout should contain exactly "OK"
Scenario: Use >= operator
Given a file named "main.cloe" with:
"""
(print (if (>= 3 1 1) "OK" "Not OK"))
"""
When I successfully run `cloe main.cloe`
Then the stdout should contain exactly "OK"
Scenario: Cannot use < operator for boolean values
Given a file named "main.cloe" with:
"""
(print (< false true))
"""
When I run `cloe main.cloe`
Then the exit status should not be 0