Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit f18d037

Browse files
add test case to reproduce issue #243
1 parent 3c5089c commit f18d037

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

standalone/src/test/java/com/trivadis/plsql/formatter/sqlcl/tests/TvdFormatIgnoreTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ public void ignore_in_json_object_file_does_not_exist() throws IOException {
3737
Assertions.assertTrue(actual.contains("Ignore file does_not_exist.txt does not exist."));
3838
}
3939

40+
@Test
41+
public void ignore_file_and_single_file_to_format() throws IOException {
42+
// issue 243
43+
var ignoreFileContent = """
44+
# Ignore files with syntax errors
45+
**/*syntax*
46+
""";
47+
final Path ignoreFile = Paths.get(getTempDir() + "/ignore.txt");
48+
Files.write(ignoreFile, ignoreFileContent.getBytes());
49+
var actual = runCommand( "tvdformat " + getTempDir()+"/query.sql" + " ignore=" + getTempDir() + "/ignore.txt");
50+
Assertions.assertTrue(actual.contains("1 of 1"));
51+
}
52+
53+
4054
@Test
4155
public void ignore_two_files() throws IOException {
4256
var ignoreFileContent = """

0 commit comments

Comments
 (0)