Tests: generate-tests.ps1 takes LoadOptions from loadoptions.txt
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
|
# Copyright 2019-2020 Katy Coe - http://www.djkaty.com - https://github.com/djkaty
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
||||||
# Generate Tests.cs
|
# Generate Tests.cs
|
||||||
@@ -19,10 +19,15 @@ namespace Il2CppInspector
|
|||||||
"@ > $testGen
|
"@ > $testGen
|
||||||
|
|
||||||
gci -Directory $bin | % {
|
gci -Directory $bin | % {
|
||||||
|
$loadOptionsFile = "$($_.FullName)\loadoptions.txt"
|
||||||
|
$loadOptions = ""
|
||||||
|
if (Test-Path $loadOptionsFile -PathType Leaf) {
|
||||||
|
$loadOptions = cat $loadOptionsFile
|
||||||
|
}
|
||||||
echo @"
|
echo @"
|
||||||
[Test]
|
[Test]
|
||||||
public void $($_.Name -Replace '\W','_')() {
|
public void $($_.Name -Replace '\W','_')() {
|
||||||
runTest(@"$($_.FullName)");
|
runTest(@"$($_.FullName)", new LoadOptions { $loadOptions });
|
||||||
}
|
}
|
||||||
|
|
||||||
"@ >> $testGen
|
"@ >> $testGen
|
||||||
|
|||||||
Reference in New Issue
Block a user