mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Add MODE=optlinux build mode (#141)
This commit is contained in:
parent
226aaf3547
commit
67b5200a0b
111 changed files with 934 additions and 854 deletions
2
third_party/python/Lib/idlelib/config.py
vendored
2
third_party/python/Lib/idlelib/config.py
vendored
|
@ -839,7 +839,7 @@ class ConfigChanges(dict):
|
|||
if idleConf.defaultCfg[config_type].Get(section, item) == value:
|
||||
# The setting equals a default setting, remove it from user cfg.
|
||||
return idleConf.userCfg[config_type].RemoveOption(section, item)
|
||||
# If we got here, set the option.
|
||||
# If we goth here, set the option.
|
||||
return idleConf.userCfg[config_type].SetOption(section, item, value)
|
||||
|
||||
def save_all(self):
|
||||
|
|
4
third_party/python/Lib/ipaddress.py
vendored
4
third_party/python/Lib/ipaddress.py
vendored
|
@ -797,7 +797,7 @@ class _BaseNetwork(_IPAddressBase):
|
|||
yield s1
|
||||
s1, s2 = s2.subnets()
|
||||
else:
|
||||
# If we got here, there's a bug somewhere.
|
||||
# If we goth here, there's a bug somewhere.
|
||||
raise AssertionError('Error performing exclusion: '
|
||||
's1: %s s2: %s other: %s' %
|
||||
(s1, s2, other))
|
||||
|
@ -806,7 +806,7 @@ class _BaseNetwork(_IPAddressBase):
|
|||
elif s2 == other:
|
||||
yield s1
|
||||
else:
|
||||
# If we got here, there's a bug somewhere.
|
||||
# If we goth here, there's a bug somewhere.
|
||||
raise AssertionError('Error performing exclusion: '
|
||||
's1: %s s2: %s other: %s' %
|
||||
(s1, s2, other))
|
||||
|
|
2
third_party/python/Lib/smtplib.py
vendored
2
third_party/python/Lib/smtplib.py
vendored
|
@ -886,7 +886,7 @@ class SMTP:
|
|||
else:
|
||||
self._rset()
|
||||
raise SMTPDataError(code, resp)
|
||||
#if we got here then somebody got our mail
|
||||
#if we goth here then somebody got our mail
|
||||
return senderrs
|
||||
|
||||
def send_message(self, msg, from_addr=None, to_addrs=None,
|
||||
|
|
BIN
third_party/python/Lib/test/hello.com
vendored
Executable file
BIN
third_party/python/Lib/test/hello.com
vendored
Executable file
Binary file not shown.
22
third_party/python/Lib/test/test_cosmo.py
vendored
Normal file
22
third_party/python/Lib/test/test_cosmo.py
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
import unittest
|
||||
import subprocess
|
||||
|
||||
|
||||
class SubprocessTest(unittest.TestCase):
|
||||
def test_execve(self):
|
||||
tmp_dir = tempfile.mkdtemp()
|
||||
self.addCleanup(shutil.rmtree, tmp_dir)
|
||||
exe = os.path.join(tmp_dir, 'hello.com')
|
||||
shutil.copyfile('/zip/.python/test/hello.com', exe)
|
||||
os.chmod(exe, 0755)
|
||||
proc = subprocess.Popen([exe], stdout=subprocess.PIPE)
|
||||
stdout, stderr = proc.communicate()
|
||||
self.assertEqual(b'hello world\n', stdout)
|
||||
self.assertEqual(0, proc.wait())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
|
@ -502,7 +502,7 @@ class TestUrlopen(unittest.TestCase):
|
|||
return handler
|
||||
|
||||
def test_redirection(self):
|
||||
expected_response = b"We got here..."
|
||||
expected_response = b"We goth here..."
|
||||
responses = [
|
||||
(302, [("Location", "http://localhost:%(port)s/somewhere_else")],
|
||||
""),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue