This repository was archived by the owner on Aug 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
standalone/src/test/java/com/trivadis/plsql/formatter/sqlcl/tests Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ var getVersion = function() {
5757var getFiles = function ( rootPath , extensions , ignoreMatcher ) {
5858 var files ;
5959 if ( existsFile ( rootPath ) ) {
60- if ( isRelevantFile ( rootPath , extensions , ignoreMatcher ) ) {
60+ if ( isRelevantFile ( javaPaths . get ( rootPath . toString ( ) ) , extensions , ignoreMatcher ) ) {
6161 files = javaArrays . asList ( javaPaths . get ( rootPath . toString ( ) ) ) ;
6262 } else {
6363 files = [ ] ;
Original file line number Diff line number Diff 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 = """
You can’t perform that action at this time.
0 commit comments