diff options
| author | ruki <[email protected]> | 2024-03-29 21:01:47 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-03-29 21:01:47 +0800 |
| commit | 339c6712f390c511c98159ad7c5c8731734ba0c0 (patch) | |
| tree | 8462ad149ad96cbacb285b3c1f5552c69669a056 /tests/modules/private/select_script/test.lua | |
| parent | 0ed3ddc176a7e97f9dfe6fcb76c241cc0eafdbff (diff) | |
improve select pattern
Diffstat (limited to 'tests/modules/private/select_script/test.lua')
| -rw-r--r-- | tests/modules/private/select_script/test.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/modules/private/select_script/test.lua b/tests/modules/private/select_script/test.lua index 1ba820b63..90258c232 100644 --- a/tests/modules/private/select_script/test.lua +++ b/tests/modules/private/select_script/test.lua @@ -21,8 +21,9 @@ function test_plat_only(t) t:require_not(_match_patterns("!macosx", {plat = "macosx"})) t:require_not(_match_patterns("!mac*", {plat = "macosx"})) t:require(_match_patterns("!macosx", {plat = "linux"})) - t:require(_match_patterns({"!macosx", "!android"}, {plat = "linux"})) - t:require_not(_match_patterns({"!macosx", "!android"}, {plat = "android"})) + t:require(_match_patterns("!macosx,!android", {plat = "linux"})) + t:require_not(_match_patterns("!macosx,!android", {plat = "android"})) + t:require_not(_match_patterns("!macosx,!android", {plat = "macosx"})) t:require(_match_patterns("!mac*", {plat = "linux"})) end @@ -36,6 +37,8 @@ function test_plat_arch(t) t:require_not(_match_patterns("!macosx|x86_64", {plat = "macosx", arch = "x86_64"})) t:require_not(_match_patterns("!mac*|x86_64", {plat = "macosx", arch = "x86_64"})) t:require(_match_patterns("!macosx|x86_64", {plat = "linux", arch = "x86_64"})) + t:require(_match_patterns("!macosx|x86_64,!iphoneos|arm64", {plat = "linux", arch = "x86_64"})) + t:require_not(_match_patterns("!macosx|x86_64,!linux|x86_64", {plat = "linux", arch = "x86_64"})) t:require(_match_patterns("!mac*|x86_64", {plat = "linux", arch = "x86_64"})) t:require(_match_patterns("macosx|!i386", {plat = "macosx", arch = "x86_64"})) t:require(_match_patterns("!macosx|!i386", {plat = "linux", arch = "x86_64"})) @@ -84,6 +87,7 @@ end function test_plat_subhost(t) t:require(_match_patterns("*@macosx", {plat = "macosx", subhost = "macosx"})) t:require(_match_patterns("android@macosx", {plat = "android", subhost = "macosx"})) + t:require_not(_match_patterns("!android@macosx,!android@linux", {plat = "android", subhost = "macosx"})) t:require(_match_patterns("android@macosx,linux", {plat = "android", subhost = "linux"})) t:require(_match_patterns("android@mac*", {plat = "android", subhost = "macosx"})) t:require(_match_patterns("android@!macosx", {plat = "android", subhost = "linux"})) |
