diff options
Diffstat (limited to 'pkgs/games/build-support/monogame-patcher/src/test.sh')
-rw-r--r-- | pkgs/games/build-support/monogame-patcher/src/test.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/games/build-support/monogame-patcher/src/test.sh b/pkgs/games/build-support/monogame-patcher/src/test.sh index b7380f27..b03fa6cb 100644 --- a/pkgs/games/build-support/monogame-patcher/src/test.sh +++ b/pkgs/games/build-support/monogame-patcher/src/test.sh @@ -18,7 +18,7 @@ using System.IO; public class b { public static string replacement(string bar) { - if (bar == "nope") + if (bar == "nope" || bar == "yikes") return "nope"; Console.WriteLine("bar called: " + bar); return "bar"; @@ -49,15 +49,20 @@ EOF cat > "test1.cs" <<EOF class test1 { + public static void unrelated() { + b.replacement("yikes"); + } + public static void Main() { a.replaceMe("xxx"); b.replacement("nope"); + test1.unrelated(); } } EOF cat > "test2.cs" <<EOF -class test1 { +class test2 { public static void Main() { b.wrongFileStreamUse(); } @@ -87,7 +92,7 @@ test "$(mono subdir/test1.exe)" = "bar called: xxx" "$out/bin/monogame-patcher" replace-call -i subdir/test1.exe -a subdir/c.dll \ "System.String b::replacement(System.String)" \ "System.String c::anotherReplacement(System.String)" \ - test1 + test1::Main test "$(mono subdir/test1.exe)" = "foobar called: xxx" |