Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add testContainsEmoji #62

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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