-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix quoting in IDs * Trailing whitespace * Fix test * Fix dependence on Id sort * Additional test case
- Loading branch information
Showing
7 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
k-distribution/tests/regression-new/issue-2315-id-quotes/1.test
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
test |
3 changes: 3 additions & 0 deletions
3
k-distribution/tests/regression-new/issue-2315-id-quotes/1.test.out
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<k> | ||
false ~> . | ||
</k> |
1 change: 1 addition & 0 deletions
1
k-distribution/tests/regression-new/issue-2315-id-quotes/2.test
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
test2 |
3 changes: 3 additions & 0 deletions
3
k-distribution/tests/regression-new/issue-2315-id-quotes/2.test.out
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<k> | ||
true ~> . | ||
</k> |
7 changes: 7 additions & 0 deletions
7
k-distribution/tests/regression-new/issue-2315-id-quotes/Makefile
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
DEF=test | ||
EXT=test | ||
TESTDIR=. | ||
KOMPILE_BACKEND=llvm | ||
KOMPILE_FLAGS=--syntax-module TEST | ||
|
||
include ../../../include/kframework/ktest.mak |
16 changes: 16 additions & 0 deletions
16
k-distribution/tests/regression-new/issue-2315-id-quotes/test.k
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module TEST | ||
imports ID | ||
imports BOOL | ||
imports K-EQUAL | ||
imports STRING | ||
imports INT | ||
|
||
syntax Bool ::= "test" [function] | ||
| "test2" [function] | ||
|
||
// Evaluates to true if the Id constructed by String2Id contains extra quotes | ||
rule test => String2Id("x") ==K #token("\"x\"", "Id") | ||
|
||
// Test that hooks producing a result of sort String are wrapped | ||
rule test2 => Int2String(2) ==K "2" | ||
endmodule |
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