Skip to content

Commit

Permalink
Merge pull request #791 from hcf/utf-8-characters-in-symbols
Browse files Browse the repository at this point in the history
Utf 8 characters in symbols
  • Loading branch information
amolenaar committed Sep 24, 2015
2 parents c3d6941 + 8409885 commit 5da06ec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/fitnesse/testsystems/slim/tables/SlimTable.java
Expand Up @@ -30,7 +30,7 @@
import static fitnesse.testsystems.slim.tables.ComparatorUtil.approximatelyEqual;

public abstract class SlimTable {
private static final Pattern SYMBOL_ASSIGNMENT_PATTERN = Pattern.compile("\\A\\s*\\$(\\w+)\\s*=\\s*\\Z");
private static final Pattern SYMBOL_ASSIGNMENT_PATTERN = Pattern.compile("\\A\\s*\\$([\\w\\p{L}]+)\\s*=\\s*\\Z");

private String tableName;
private int instructionNumber = 0;
Expand Down
10 changes: 10 additions & 0 deletions test/fitnesse/testsystems/slim/tables/ScriptTableTest.java
Expand Up @@ -415,6 +415,16 @@ public void setSymbol() throws Exception {
assertEquals(expectedInstructions, instructions());
}

@Test
public void setSymbolUTF8() throws Exception {
buildInstructionsFor("|$ÆØÅ=|function|arg|\n", false);
List<CallAndAssignInstruction> expectedInstructions =
asList(
new CallAndAssignInstruction("scriptTable_id_0", "ÆØÅ", "scriptTableActor", "function", new Object[]{"arg"})
);
assertEquals(expectedInstructions, instructions());
}

@Test
public void useSymbol() throws Exception {
buildInstructionsFor("|function|$V|\n", false);
Expand Down

0 comments on commit 5da06ec

Please sign in to comment.