Skip to content

Commit

Permalink
test: add testContainsEmoji (#62)
Browse files Browse the repository at this point in the history
This closes #57.

The functionality may be fixed by #61.

Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun authored Mar 21, 2023
1 parent 9e1d7d3 commit 52c30dc
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ void testExclusions(@TempDir Path tempDir) throws IOException {
assertThat(selectedFiles).containsExactlyInAnyOrderElementsOf(expectedSelectedFiles);
}

@Test
void testContainsEmoji(@TempDir Path tempDir) throws IOException {
final File root = createFakeProject(tempDir, new String[]{"🏡Home.py"});
final Selection selection = new Selection(root, new String[]{"**/*.py"}, new String[0], false);
final String[] selectedFiles = selection.getSelectedFiles();
final List<String> expectedSelectedFiles = List.of("🏡Home.py");
assertThat(selectedFiles).containsExactlyInAnyOrderElementsOf(expectedSelectedFiles);
}

private File createFakeProject(Path tempDir, String[] paths) throws IOException {
final File temp = tempDir.toFile();
for (String path : paths) {
Expand Down

0 comments on commit 52c30dc

Please sign in to comment.