Improve base guidance and qualify bounded aircraft route and hidden test lifecycle
This commit is contained in:
@@ -60,6 +60,28 @@ class GameRunnerTests(unittest.TestCase):
|
||||
runner.assert_prefix_idle(compat, root)
|
||||
runner.assert_prefix_idle(root/'different', root)
|
||||
|
||||
def test_proton_trailing_prefix_slashes_refuse_existing_workbench_and_wine(self):
|
||||
for command in (b'wineserver\0', b'Z:/Workbench/ArmaReforgerWorkbenchSteamDiag.exe\0'):
|
||||
for suffix in ('','/','////'):
|
||||
with self.subTest(command=command,suffix=suffix),tempfile.TemporaryDirectory() as directory:
|
||||
root=Path(directory);compat=root/'compat';proc=self.process(root,command)
|
||||
data=('WINEPREFIX='+str(compat/'pfx')+suffix).encode()+b'\0OTHER=unchanged\0'
|
||||
(proc/'environ').write_bytes(data)
|
||||
with self.assertRaisesRegex(ValueError,'prefix already has a process'):
|
||||
runner.assert_prefix_idle(compat,root)
|
||||
self.assertEqual((proc/'environ').read_bytes(),data)
|
||||
def test_prefix_idle_does_not_resolve_neighbours_dot_components_or_symlink_spellings(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root=Path(directory);compat=root/'compat';prefix=compat/'pfx';prefix.mkdir(parents=True)
|
||||
alias=root/'alias';alias.symlink_to(prefix,target_is_directory=True)
|
||||
proc=self.process(root,b'wineserver\0')
|
||||
for value in (str(prefix)+'-other/',str(prefix)+'/./',str(prefix)+'/../pfx/',str(alias)+'/',
|
||||
str(prefix).replace('/pfx','//pfx'),str(prefix)+'\\','pfx/',str(prefix)+' /'):
|
||||
data=('WINEPREFIX='+value).encode()+b'\0';(proc/'environ').write_bytes(data)
|
||||
with self.subTest(value=value):runner.assert_prefix_idle(compat,root)
|
||||
self.assertEqual((proc/'environ').read_bytes(),data)
|
||||
(proc/'environ').write_bytes(('OTHER_WINEPREFIX='+str(prefix)+'/').encode()+b'\0')
|
||||
runner.assert_prefix_idle(compat,root)
|
||||
def test_nondumpable_native_service_does_not_require_environment(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
|
||||
Reference in New Issue
Block a user