This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from Trivadis/bugfix/issue-106-param-with-spaces
Bugfix/issue #106 Cannot process RootPath with spaces
- Loading branch information
Showing
2 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
tests/src/test/java/com/trivadis/plsql/formatter/sqlcl/tests/TvdFormatPathWithSpaceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.trivadis.plsql.formatter.sqlcl.tests; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
import java.nio.file.Paths; | ||
|
||
public class TvdFormatPathWithSpaceTest extends AbstractSqlclTest { | ||
|
||
@Before | ||
public void registerCommandBeforeTest() { | ||
runScript("--register"); | ||
byteArrayOutputStream.reset(); | ||
} | ||
|
||
@Test | ||
public void path_with_spaces() throws IOException { | ||
final Path myFilesDir = Files.createTempDirectory("my files"); | ||
final String actual = runCommand("tvdformat \"" + myFilesDir.toAbsolutePath() + "\""); | ||
// directory is empty, no files processed | ||
Assert.assertTrue(actual.trim().isEmpty()); | ||
} | ||
|
||
} | ||
|