icecat: update to upstream version 128.0.14-1gnu1
This commit is contained in:
parent
0cdda4f34e
commit
56c3deff60
77 changed files with 8997 additions and 3862 deletions
|
|
@ -486,11 +486,6 @@ def which(cmd, mode=os.F_OK | os.X_OK, path=None, exts=None, extra_search_dirs=(
|
|||
if not exts:
|
||||
exts = oldexts.split(os.pathsep)
|
||||
|
||||
# This ensures that `cmd` without any extensions will be found.
|
||||
# See: https://bugs.python.org/issue31405
|
||||
if "." not in exts:
|
||||
exts.append(".")
|
||||
|
||||
os.environ["PATHEXT"] = os.pathsep.join(exts)
|
||||
try:
|
||||
path = shutil_which(cmd, mode=mode, path=path)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import os
|
|||
import sys
|
||||
|
||||
import mozunit
|
||||
import six
|
||||
from mozfile import which
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
|
|
@ -16,10 +15,8 @@ def test_which(monkeypatch):
|
|||
monkeypatch.chdir(cwd)
|
||||
|
||||
if sys.platform == "win32":
|
||||
if six.PY3:
|
||||
import winreg
|
||||
else:
|
||||
import _winreg as winreg
|
||||
import winreg
|
||||
|
||||
bindir = os.path.join(cwd, "win")
|
||||
monkeypatch.setenv("PATH", bindir)
|
||||
monkeypatch.setattr(winreg, "QueryValue", (lambda k, sk: None))
|
||||
|
|
@ -27,13 +24,13 @@ def test_which(monkeypatch):
|
|||
assert which("foo.exe").lower() == os.path.join(bindir, "foo.exe").lower()
|
||||
assert which("foo").lower() == os.path.join(bindir, "foo.exe").lower()
|
||||
assert (
|
||||
which("foo", exts=[".FOO", ".BAR"]).lower()
|
||||
which("foo", exts=[".FOO", ".BAR", "."]).lower()
|
||||
== os.path.join(bindir, "foo").lower()
|
||||
)
|
||||
assert os.environ.get("PATHEXT") != [".FOO", ".BAR"]
|
||||
assert which("foo.txt") is None
|
||||
|
||||
assert which("bar").lower() == os.path.join(bindir, "bar").lower()
|
||||
assert which("bar", exts=["."]).lower() == os.path.join(bindir, "bar").lower()
|
||||
assert which("baz").lower() == os.path.join(cwd, "baz.exe").lower()
|
||||
|
||||
registered_dir = os.path.join(cwd, "registered")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue