Skip to content
Snippets Groups Projects
Commit c2376fdb authored by loki der quaeler's avatar loki der quaeler Committed by loki der quaeler
Browse files

Accomodating Windows full paths including drive letter - #424

. Adding a Windows unit test

[Enhancement][Tools]
parent c04de39e
No related branches found
No related tags found
No related merge requests found
...@@ -20,4 +20,22 @@ public class SimpleFilenameToStreamTest { ...@@ -20,4 +20,22 @@ public class SimpleFilenameToStreamTest {
assertNotNull(file); assertNotNull(file);
assertTrue(file.getAbsolutePath() + " does not exist!", file.exists()); assertTrue(file.getAbsolutePath() + " does not exist!", file.exists());
} }
/**
* Test whether the fix for #424 still works
*/
@Test
public void testWindowsTLAFileCreation() {
if (System.getProperty("os.name").toLowerCase().indexOf("win") > -1) {
final String driveLetter = "X:";
final String parentDirectory = driveLetter + "\\Develop\\myspecs\\DecentSpec\\";
final String child = parentDirectory + "Fromage.tla";
final FilenameToStream.TLAFile file = new FilenameToStream.TLAFile(parentDirectory, child, null);
final int driveLetterCount = file.getAbsolutePath().split(driveLetter).length - 1;
assertTrue("There should be 1 drive letter in the child's absolute path, but there are " + driveLetterCount,
(1 == driveLetterCount));
}
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment