diff options
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs')
-rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs b/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs index b7f2f9c0..a48a8370 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs | |||
@@ -15,6 +15,60 @@ namespace WixToolsetTest.CoreIntegration | |||
15 | public class WixlibFixture | 15 | public class WixlibFixture |
16 | { | 16 | { |
17 | [Fact] | 17 | [Fact] |
18 | public void CanBuildSimpleBundleUsingWixlib() | ||
19 | { | ||
20 | var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe"); | ||
21 | var folder = TestData.Get(@"TestData\SimpleBundle"); | ||
22 | |||
23 | using (var fs = new DisposableFileSystem()) | ||
24 | { | ||
25 | var baseFolder = fs.GetFolder(); | ||
26 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
27 | |||
28 | var result = WixRunner.Execute(new[] | ||
29 | { | ||
30 | "build", | ||
31 | Path.Combine(folder, "MultiFileBootstrapperApplication.wxs"), | ||
32 | "-intermediateFolder", intermediateFolder, | ||
33 | "-o", Path.Combine(intermediateFolder, @"test.wixlib") | ||
34 | }); | ||
35 | |||
36 | result.AssertSuccess(); | ||
37 | |||
38 | result = WixRunner.Execute(new[] | ||
39 | { | ||
40 | "build", | ||
41 | Path.Combine(folder, "MultiFileBundle.wxs"), | ||
42 | "-loc", Path.Combine(folder, "Bundle.en-us.wxl"), | ||
43 | "-lib", Path.Combine(intermediateFolder, @"test.wixlib"), | ||
44 | "-bindpath", Path.Combine(folder, "data"), | ||
45 | "-intermediateFolder", intermediateFolder, | ||
46 | "-burnStub", burnStubPath, | ||
47 | "-o", Path.Combine(baseFolder, @"bin\test.exe") | ||
48 | }); | ||
49 | |||
50 | result.AssertSuccess(); | ||
51 | |||
52 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.exe"))); | ||
53 | #if TODO | ||
54 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); | ||
55 | #endif | ||
56 | |||
57 | var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"test.wir")); | ||
58 | var section = intermediate.Sections.Single(); | ||
59 | |||
60 | var bundleTuple = section.Tuples.OfType<WixBundleTuple>().Single(); | ||
61 | Assert.Equal("1.0.0.0", bundleTuple.Version); | ||
62 | |||
63 | var previousVersion = bundleTuple.Fields[(int)WixBundleTupleFields.Version].PreviousValue; | ||
64 | Assert.Equal("!(bind.packageVersion.test.msi)", previousVersion.AsString()); | ||
65 | |||
66 | var msiTuple = section.Tuples.OfType<WixBundlePackageTuple>().Single(); | ||
67 | Assert.Equal("test.msi", msiTuple.Id.Id); | ||
68 | } | ||
69 | } | ||
70 | |||
71 | [Fact] | ||
18 | public void CanBuildSingleFileUsingWixlib() | 72 | public void CanBuildSingleFileUsingWixlib() |
19 | { | 73 | { |
20 | var folder = TestData.Get(@"TestData\SingleFile"); | 74 | var folder = TestData.Get(@"TestData\SingleFile"); |