Skip to content

Commit

Permalink
[tests] Test path with custom current version
Browse files Browse the repository at this point in the history
Related to #526
  • Loading branch information
tobil4sk committed Apr 13, 2022
1 parent 4d2363d commit 9b00487
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/tests/integration/TestPath.hx
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,21 @@ class TestPath extends IntegrationTests {
assertFail(r);
assertEquals('Error: Cannot process `bar:1.0.0`: Library Bar has two versions included : 2.0.0 and 1.0.0', r.err.trim());
}

function testInvalidCurrentVersion():Void {
// for now, Shiro Games needs this to work
final r = haxelib(["install", "libraries/libBar.zip"]).result();
assertSuccess(r);

final customVersion = "custom";
final projectPath = barPath.directory().directory();
final customPath = Path.join([projectPath, customVersion]).addTrailingSlash();

sys.FileSystem.rename(barPath, customPath);
sys.io.File.saveContent(Path.join([projectPath, ".current"]), customVersion);

final r = haxelib(["path", "Bar"]).result();
assertSuccess(r);
assertOutputEquals([customPath, '-D Bar=1.0.0'], r.out.trim());
}
}

0 comments on commit 9b00487

Please sign in to comment.