File tree Expand file tree Collapse file tree 5 files changed +50
-23
lines changed Expand file tree Collapse file tree 5 files changed +50
-23
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ class HaxelibTests {
69
69
r .add (new TestRemoveSymlinks ());
70
70
r .add (new TestRemoveSymlinksBroken ());
71
71
r .add (new TestInstaller ());
72
+ r .add (new TestLibFlagData ());
72
73
r .add (new TestRepoManager ());
73
74
r .add (new TestRepoReformatter ());
74
75
r .add (new TestRepoReformatterOnLocal ());
Original file line number Diff line number Diff line change
1
+ -cpp bin
Original file line number Diff line number Diff line change 1
- -cpp bin
2
1
--cpp bin
Original file line number Diff line number Diff line change @@ -75,28 +75,6 @@ class TestInstaller extends TestBase {
75
75
assertFalse (FileSystem .exists (Path .join ([lib , " git" , " README.md" ])));
76
76
}
77
77
78
- public function testInstallHxmlWithBackend () {
79
- // inferred from -cpp/--cpp flags
80
- installer .installFromHxml (" cpp.hxml" , (libs ) -> {
81
- assertEquals (1 , Lambda .count (libs , (lib ) -> lib .name == " hxcpp" ));
82
- return false ;
83
- });
84
-
85
- // specified explicitly
86
- // test for issue #511
87
- installer .installFromHxml (" target-lib.hxml" , (libs ) -> {
88
- assertEquals (1 , Lambda .count (libs , (lib ) -> lib .name == " hxcpp" ));
89
- return false ;
90
- });
91
-
92
- // specified explicitly with non-standard capitalisation
93
- installer .installFromHxml (" target-lib-uppercase.hxml" , (libs ) -> {
94
- assertEquals (1 , Lambda .count (libs , (lib ) -> lib .name == " HXCPP" ));
95
- assertEquals (0 , Lambda .count (libs , (lib ) -> lib .name == " hxcpp" ));
96
- return false ;
97
- });
98
- }
99
-
100
78
public function testReinstallHxml () {
101
79
installer .installFromHxml (" git-deps.hxml" );
102
80
Original file line number Diff line number Diff line change
1
+ package tests ;
2
+
3
+ import haxe .io .Path ;
4
+ import haxelib .api .LibFlagData ;
5
+
6
+ using Lambda ;
7
+
8
+ class TestLibFlagData extends TestBase {
9
+
10
+ static var CWD : String = null ;
11
+
12
+ override function setup () {
13
+ CWD = Sys .getCwd ();
14
+
15
+ final dir = Path .join ([CWD , " test/libraries/InstallDeps" ]);
16
+ Sys .setCwd (dir );
17
+ }
18
+
19
+ override function tearDown () {
20
+ Sys .setCwd (CWD );
21
+ }
22
+
23
+ function testTargetFlag () {
24
+ final libraries = fromHxml (" cpp.hxml" );
25
+
26
+ assertEquals (1 , libraries .count (f -> f .name == " hxcpp" ));
27
+
28
+ final libraries = fromHxml (" cpp-single.hxml" );
29
+
30
+ assertEquals (1 , libraries .count (f -> f .name == " hxcpp" ));
31
+ }
32
+
33
+ // test for issue #511
34
+ function testBackendExplicit () {
35
+ final libraries = fromHxml (" target-lib.hxml" );
36
+
37
+ assertEquals (1 , libraries .count (f -> f .name == " hxcpp" ));
38
+ }
39
+
40
+ // specified explicitly with non-standard capitalisation
41
+ function testBackendExplicitUppercase () {
42
+ final libraries = fromHxml (" target-lib-uppercase.hxml" );
43
+
44
+ assertEquals (1 , libraries .count (f -> f .name == " HXCPP" ));
45
+ assertEquals (0 , libraries .count (f -> f .name == " hxcpp" ));
46
+ }
47
+
48
+ }
You can’t perform that action at this time.
0 commit comments