aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2023-10-26 22:09:30 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2023-10-27 17:43:03 +0300
commit20bcca39726803aba56fcc388332622d70605e1a (patch)
tree0e5ddc919a7f038a4c8a9aa082567db95a9396dc /test cases
parent3bbe66e971dfe84dcffa702c2673fb136da0a508 (diff)
downloadmeson-20bcca39726803aba56fcc388332622d70605e1a.zip
meson-20bcca39726803aba56fcc388332622d70605e1a.tar.gz
meson-20bcca39726803aba56fcc388332622d70605e1a.tar.bz2
Handle path behaviour change in Python 3.12.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/220 fs module/meson.build4
1 files changed, 3 insertions, 1 deletions
diff --git a/test cases/common/220 fs module/meson.build b/test cases/common/220 fs module/meson.build
index 7f113d6..8001963 100644
--- a/test cases/common/220 fs module/meson.build
+++ b/test cases/common/220 fs module/meson.build
@@ -39,7 +39,9 @@ assert(fs.expanduser('~/foo').endswith('foo'), 'expanduser with tail failed')
# -- as_posix
assert(fs.as_posix('/') == '/', 'as_posix idempotent')
assert(fs.as_posix('\\') == '/', 'as_posix simple')
-assert(fs.as_posix('\\\\') == '/', 'as_posix simple')
+# Python 3.12 changed how these paths are handled, so deal with both.
+drivepath = fs.as_posix('\\\\')
+assert(drivepath == '/' or drivepath == '//', 'as_posix simple')
assert(fs.as_posix('foo\\bar/baz') == 'foo/bar/baz', 'as_posix mixed slash')
# -- is_absolute