This repository has been archived by the owner on Oct 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace expect: with prints: syntax in text fixtures.
- Loading branch information
1 parent
89130d2
commit 1afbf4a
Showing
17 changed files
with
73 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
(comment on it's own) | ||
|
||
say "the words" (comment at the end of a line) (expect: the words\n) | ||
say "the words" (comment at the end of a line) (prints: the words) | ||
|
||
say (comment between items) "you want to say" (expect: you want to say\n) | ||
say (comment between items) "you want to say" (prints: you want to say) | ||
|
||
(comment before items) say "whatever you want" (expect: whatever you want\n) | ||
(comment before items) say "whatever you want" (prints: whatever you want) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
my heart is true | ||
say my heart (expect: true\n) | ||
say my heart (prints: true) | ||
|
||
my love is false | ||
say my love (expect: false\n) | ||
say my love (prints: false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
say -123.45 (expect: -123.45\n) | ||
say -1 (expect: -1\n) | ||
say 0 (expect: 0\n) | ||
say 1 (expect: 1\n) | ||
say 123.45 (expect: 123.45\n) | ||
say -123.45 (prints: -123.45) | ||
say -1 (prints: -1) | ||
say 0 (prints: 0) | ||
say 1 (prints: 1) | ||
say 123.45 (prints: 123.45) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Say "hello world" (expect: hello world\n) | ||
Say "Hello World" (expect: Hello World\n) | ||
SAY "HELLO WORLD" (expect: HELLO WORLD\n) | ||
Say "hello world" (prints: hello world) | ||
Say "Hello World" (prints: Hello World) | ||
SAY "HELLO WORLD" (prints: HELLO WORLD) |
30 changes: 15 additions & 15 deletions
30
Starship/Rockstar.Test/fixtures/literals/literalAliases.rock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
say mysterious (expect: mysterious\n) | ||
say mysterious (prints: mysterious) | ||
|
||
say null (expect: null\n) | ||
say nothing (expect: null\n) | ||
say nowhere (expect: null\n) | ||
say nobody (expect: null\n) | ||
say gone (expect: null\n) | ||
say null (prints: null) | ||
say nothing (prints: null) | ||
say nowhere (prints: null) | ||
say nobody (prints: null) | ||
say gone (prints: null) | ||
|
||
say empty (expect: \n) | ||
say empty (prints: ) | ||
|
||
say true (expect: true\n) | ||
say right (expect: true\n) | ||
say yes (expect: true\n) | ||
say ok (expect: true\n) | ||
say true (prints: true) | ||
say right (prints: true) | ||
say yes (prints: true) | ||
say ok (prints: true) | ||
|
||
say false (expect: false\n) | ||
say wrong (expect: false\n) | ||
say no (expect: false\n) | ||
say lies (expect: false\n) | ||
say false (prints: false) | ||
say wrong (prints: false) | ||
say no (prints: false) | ||
say lies (prints: false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(expect: What is not denied is permitted!\n) | ||
(prints: What is not denied is permitted!) | ||
Shout "What is not denied is permitted!" | ||
|
||
(expect: This ain't not allowed!\n) | ||
(prints: This ain't not allowed!) | ||
Shout "This ain't not allowed!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
say 2 plus 2 (expect: 4\n) | ||
say 2 with 2 (expect: 4\n) | ||
say 5 minus 3 (expect: 2\n) | ||
say 5 without 3 (expect: 2\n) | ||
say 5 times 5 (expect: 25\n) | ||
say 5 of 5 (expect: 25\n) | ||
say 4 over 2 (expect: 2\n) | ||
say 2 plus 2 (prints: 4) | ||
say 2 with 2 (prints: 4) | ||
say 5 minus 3 (prints: 2) | ||
say 5 without 3 (prints: 2) | ||
say 5 times 5 (prints: 25) | ||
say 5 of 5 (prints: 25) | ||
say 4 over 2 (prints: 2) | ||
|
||
|
10 changes: 5 additions & 5 deletions
10
Starship/Rockstar.Test/fixtures/math/operator_precedence.rock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
say 1 + 1 * 2 (expect: 3\n) | ||
say 1 * 2 + 1 (expect: 3\n) | ||
say 1 / 2 * 3 + 4 (expect: 5.5\n) | ||
say 5-2*3 (expect: -1\n) | ||
say 2*3 - 5 (expect: 1\n) | ||
say 1 + 1 * 2 (prints: 3) | ||
say 1 * 2 + 1 (prints: 3) | ||
say 1 / 2 * 3 + 4 (prints: 5.5) | ||
say 5-2*3 (prints: -1) | ||
say 2*3 - 5 (prints: 1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
say 1 + 1 (expect: 2\n) | ||
say 5 + 10 (expect: 15\n) | ||
say 2.5 + 2.5 (expect: 5\n) | ||
say 1 + 0.2 + 0.03 (expect: 1.23\n) | ||
say 1 + 1 (prints: 2) | ||
say 5 + 10 (prints: 15) | ||
say 2.5 + 2.5 (prints: 5) | ||
say 1 + 0.2 + 0.03 (prints: 1.23) | ||
|
||
say 2 - 1 (expect: 1\n) | ||
say 0 - 1 (expect: -1\n) | ||
say 1 - 0.5 (expect: 0.5\n) | ||
say 2 - 1 (prints: 1) | ||
say 0 - 1 (prints: -1) | ||
say 1 - 0.5 (prints: 0.5) | ||
|
||
say 1 * 0 (expect: 0\n) | ||
say 1 * 1 (expect: 1\n) | ||
say 1 * 2 (expect: 2\n) | ||
say 2 * 2 (expect: 4\n) | ||
say 1 * 0 (prints: 0) | ||
say 1 * 1 (prints: 1) | ||
say 1 * 2 (prints: 2) | ||
say 2 * 2 (prints: 4) | ||
|
||
say 1.000000000000 (expect: 1\n) | ||
say 1.000000000000 (prints: 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
say true or 1/0 (expect: true\n) | ||
say false and 1/0 (expect: false\n) | ||
say true or 1/0 (prints: true) | ||
say false and 1/0 (prints: false) | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
Starship/Rockstar.Test/fixtures/whitespace/leading_blank_lines.rock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
|
||
(this file tests that parsers can handle BLANK leading lines) | ||
say "pass" (expect: pass\n) | ||
say "pass" (prints: pass) |
2 changes: 1 addition & 1 deletion
2
Starship/Rockstar.Test/fixtures/whitespace/leading_empty_lines.rock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
|
||
(this file tests that parsers can handle EMPTY leading lines) | ||
say "pass" (expect: pass\n) | ||
say "pass" (prints: pass) |
2 changes: 1 addition & 1 deletion
2
Starship/Rockstar.Test/fixtures/whitespace/no_newline_at_eof.rock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
(test whether parser can cope with a file that does not end with a new line) | ||
say "pass" (expect: pass\n) | ||
say "pass" (prints: pass) |
2 changes: 1 addition & 1 deletion
2
Starship/Rockstar.Test/fixtures/whitespace/trailing_blank_lines.rock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
say "pass" (expect: pass\n) | ||
say "pass" (prints: pass) | ||
(test we can cope with blank lines at the end of a file) | ||
|
2 changes: 1 addition & 1 deletion
2
Starship/Rockstar.Test/fixtures/whitespace/trailing_empty_lines.rock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
say "pass" (expect: pass\n) | ||
say "pass" (prints: pass) | ||
(test we can cope with EMPTY lines - i.e. multiple newlines - at the end of a file) |