Open wixbot opened 11 years ago
Sorry, I had a little misunderstanding on using the Lux unit test framework.
I didn't schedule the custom action in the InstallExecuteSequence and so that's why the property was not set.
However, I got confused from this requirement because of some other (now realized unexpected) behavior.
Here is some example code that illustrates the unexpected behavior:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:lux="http://schemas.microsoft.com/wix/2009/Lux">
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir" />
<CustomAction Id="CustomAction1" Property="Property1" Value="Value1" Execute="immediate" />
<CustomAction Id="CustomAction2" Property="Property2" Value="Value2" Execute="immediate" />
<Property Id="Property1" Value="[Property2]" />
<Property Id="Property2" Value="_Value2" />
<lux:UnitTest CustomAction="CustomAction1" Property="Property1" Value="[Property2]" Operator="equal" />
<lux:UnitTest CustomAction="CustomAction2" Property="Property1" Value="_Value2" Operator="equal" />
</Fragment>
</Wix>
Test lux43546C624A69F85AB7AC8BDD9409CE61 passed: Property 'Property1' matched expected value '[Property2]'. Test lux6F15CE0ABF7C9B6EA43A2C41FFC35C86 passed: Property 'Property1' matched expected value '_Value2'. All 2 tests passed.
So it seems that the
I did not expect that to be the case; the element should just check the value for equality and not behave like a type 51 custom action.
Thank you.
Originally changed by
barnson
Area
changed fromLux
toextensions
Release
changed fromv4.0
tov3.x
Hi.
Lux unit test fails when checking property values set using a type 51 custom action.
Windows 7 Enterprise 64-bit SP1
Running with 3.5.2430.0 and 3.6.3303.0:
nit.exe : error NIT8103 : Test luxFE00466110E1E8399A3E9EFEE8EC845E failed: Property 'PropertyName' expected value 'PropertyValue' but actual value was ''. nit.exe : error NIT8102 : 1 tests failed. 0 tests passed.
Running with 3.8.520.0:
nit.exe : error NIT8104 : Package failed: Fatal error during installation. nit.exe : error NIT8102 : 1 tests failed. 0 tests passed.
In all instances, nit.exe exited with return code 8102.
I tried explicitly defining the property as follows:
Running with 3.5.2430.0 and 3.6.3303.0:
nit.exe : error NIT8103 : Test luxFE00466110E1E8399A3E9EFEE8EC845E failed: Property 'PropertyName' expected value 'PropertyValue' but actual value was 'PropertyValueToReplace'. nit.exe : error NIT8102 : 1 tests failed. 0 tests passed.
Running with 3.8.520.0:
nit.exe : error NIT8104 : Package failed: Fatal error during installation. nit.exe : error NIT8102 : 1 tests failed. 0 tests passed.