diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs b/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs index 9859c05a..e9e5c62f 100644 --- a/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs | |||
@@ -18,12 +18,20 @@ namespace WixToolsetTest.CoreIntegration | |||
18 | var folder = TestData.Get(@"TestData\SingleFile"); | 18 | var folder = TestData.Get(@"TestData\SingleFile"); |
19 | 19 | ||
20 | using (var fs = new DisposableFileSystem()) | 20 | using (var fs = new DisposableFileSystem()) |
21 | using (var pushd = new Pushd(folder)) | ||
22 | { | 21 | { |
23 | var intermediateFolder = fs.GetFolder(); | 22 | var intermediateFolder = fs.GetFolder(); |
24 | 23 | ||
25 | var program = new Program(); | 24 | var program = new Program(); |
26 | var result = program.Run(new WixToolsetServiceProvider(), new[] { "build", "Package.wxs", "PackageComponents.wxs", "-loc", "Package.en-us.wxl", "-bindpath", "data", "-intermediateFolder", intermediateFolder, "-o", $@"{intermediateFolder}\bin\test.msi" }); | 25 | var result = program.Run(new WixToolsetServiceProvider(), new[] |
26 | { | ||
27 | "build", | ||
28 | Path.Combine(folder, "Package.wxs"), | ||
29 | Path.Combine(folder, "PackageComponents.wxs"), | ||
30 | "-loc", Path.Combine(folder, "Package.en-us.wxl"), | ||
31 | "-bindpath", Path.Combine(folder, "data"), | ||
32 | "-intermediateFolder", intermediateFolder, | ||
33 | "-o", Path.Combine(intermediateFolder, @"bin\test.msi") | ||
34 | }); | ||
27 | 35 | ||
28 | Assert.Equal(0, result); | 36 | Assert.Equal(0, result); |
29 | 37 | ||
@@ -35,7 +43,7 @@ namespace WixToolsetTest.CoreIntegration | |||
35 | Assert.Single(intermediate.Sections); | 43 | Assert.Single(intermediate.Sections); |
36 | 44 | ||
37 | var wixFile = intermediate.Sections.SelectMany(s => s.Tuples).OfType<WixFileTuple>().Single(); | 45 | var wixFile = intermediate.Sections.SelectMany(s => s.Tuples).OfType<WixFileTuple>().Single(); |
38 | Assert.Equal(@"data\test.txt", wixFile[WixFileTupleFields.Source].AsPath().Path); | 46 | Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path); |
39 | Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path); | 47 | Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path); |
40 | } | 48 | } |
41 | } | 49 | } |
@@ -46,12 +54,19 @@ namespace WixToolsetTest.CoreIntegration | |||
46 | var folder = TestData.Get(@"TestData\SimpleModule"); | 54 | var folder = TestData.Get(@"TestData\SimpleModule"); |
47 | 55 | ||
48 | using (var fs = new DisposableFileSystem()) | 56 | using (var fs = new DisposableFileSystem()) |
49 | using (var pushd = new Pushd(folder)) | ||
50 | { | 57 | { |
51 | var intermediateFolder = fs.GetFolder(); | 58 | var intermediateFolder = fs.GetFolder(); |
52 | 59 | ||
53 | var program = new Program(); | 60 | var program = new Program(); |
54 | var result = program.Run(new WixToolsetServiceProvider(), new[] { "build", "Module.wxs", "-loc", "Module.en-us.wxl", "-bindpath", "data", "-intermediateFolder", intermediateFolder, "-o", $@"{intermediateFolder}\bin\test.msm" }); | 61 | var result = program.Run(new WixToolsetServiceProvider(), new[] |
62 | { | ||
63 | "build", | ||
64 | Path.Combine(folder, "Module.wxs"), | ||
65 | "-loc", Path.Combine(folder, "Module.en-us.wxl"), | ||
66 | "-bindpath", Path.Combine(folder, "data"), | ||
67 | "-intermediateFolder", intermediateFolder, | ||
68 | "-o", Path.Combine(intermediateFolder, @"bin\test.msm") | ||
69 | }); | ||
55 | 70 | ||
56 | Assert.Equal(0, result); | 71 | Assert.Equal(0, result); |
57 | 72 | ||
@@ -62,7 +77,7 @@ namespace WixToolsetTest.CoreIntegration | |||
62 | Assert.Single(intermediate.Sections); | 77 | Assert.Single(intermediate.Sections); |
63 | 78 | ||
64 | var wixFile = intermediate.Sections.SelectMany(s => s.Tuples).OfType<WixFileTuple>().Single(); | 79 | var wixFile = intermediate.Sections.SelectMany(s => s.Tuples).OfType<WixFileTuple>().Single(); |
65 | Assert.Equal(@"data\test.txt", wixFile[WixFileTupleFields.Source].AsPath().Path); | 80 | Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path); |
66 | Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path); | 81 | Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path); |
67 | } | 82 | } |
68 | } | 83 | } |
@@ -73,12 +88,20 @@ namespace WixToolsetTest.CoreIntegration | |||
73 | var folder = TestData.Get(@"TestData\InstanceTransform"); | 88 | var folder = TestData.Get(@"TestData\InstanceTransform"); |
74 | 89 | ||
75 | using (var fs = new DisposableFileSystem()) | 90 | using (var fs = new DisposableFileSystem()) |
76 | using (var pushd = new Pushd(folder)) | ||
77 | { | 91 | { |
78 | var intermediateFolder = fs.GetFolder(); | 92 | var intermediateFolder = fs.GetFolder(); |
79 | 93 | ||
80 | var program = new Program(); | 94 | var program = new Program(); |
81 | var result = program.Run(new WixToolsetServiceProvider(), new[] { "build", "Package.wxs", "PackageComponents.wxs", "-loc", "Package.en-us.wxl", "-bindpath", "data", "-intermediateFolder", intermediateFolder, "-o", $@"{intermediateFolder}\bin\test.msi" }); | 95 | var result = program.Run(new WixToolsetServiceProvider(), new[] |
96 | { | ||
97 | "build", | ||
98 | Path.Combine(folder, "Package.wxs"), | ||
99 | Path.Combine(folder, "PackageComponents.wxs"), | ||
100 | "-loc", Path.Combine(folder, "Package.en-us.wxl"), | ||
101 | "-bindpath", Path.Combine(folder, "data"), | ||
102 | "-intermediateFolder", intermediateFolder, | ||
103 | "-o", Path.Combine(intermediateFolder, @"bin\test.msi") | ||
104 | }); | ||
82 | 105 | ||
83 | Assert.Equal(0, result); | 106 | Assert.Equal(0, result); |
84 | 107 | ||