Skip to content

Commit

Permalink
add tests for url differences / updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjamuffin99 committed Sep 18, 2024
1 parent 0ad9428 commit 443689a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/libraries/InstallDeps/git-deps-url-new.hxml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-lib hx.signal:git:https://github.com/boozook/hx.signal.git
-lib flixel:git:https://github.com/geokureli/flixel.git#4.5.0
2 changes: 1 addition & 1 deletion test/libraries/InstallDeps/git-deps-url-old.hxml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-lib hx.signal:git:https://github.com/fzzr-/hx.signal.git
-lib flixel:git:https://github.com/HaxeFlixel/flixel.git#4.5.0
10 changes: 10 additions & 0 deletions test/tests/TestInstaller.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package tests;

import haxelib.VersionData.VcsID;
import sys.FileSystem;
import sys.io.File;
import haxe.io.Path;
Expand Down Expand Up @@ -106,7 +107,16 @@ class TestInstaller extends TestBase {
}

public function testInstallUrlChanges() {
installer.installFromHxml("git-deps-url-old.hxml");

assertTrue(scope.isLibraryInstalled(ProjectName.ofString("flixel")));
assertEquals(scope.repository.getVcsData(ProjectName.ofString("flixel"), VcsID.Git).url, "https://github.com/HaxeFlixel/flixel.git");


installer.installFromHxml("git-deps-url-new.hxml");

assertTrue(scope.isLibraryInstalled(ProjectName.ofString("flixel")));
assertEquals(scope.repository.getVcsData(ProjectName.ofString("flixel"), VcsID.Git).url, "https://github.com/geokureli/flixel.git");
}

function getLibraryName():String {
Expand Down

0 comments on commit 443689a

Please sign in to comment.