test: drop whitespace after shell redirection operators
(The one case that is left unchanged is '< <(subcommand)'.) This way, the style with no gap was already dominant. This way, the reader immediately knows that ' < ' is a comparison operator and ' << ' is a shift. In a few cases, replace custom EOF replacement by just EOF. There is no point in using someting like "_EOL" unless "EOF" appears in the text.
This commit is contained in:
@@ -36,14 +36,14 @@ class ExecutionResumeTest(unittest.TestCase):
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sleep 3
|
||||
ExecStart=/bin/bash -c "echo foo >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo foo >>{self.output_file}"
|
||||
'''
|
||||
self.unit_files[InstallChange.NO_CHANGE] = unit_file_content
|
||||
|
||||
unit_file_content = f'''
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash -c "echo foo >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo foo >>{self.output_file}"
|
||||
ExecStart=/bin/sleep 3
|
||||
'''
|
||||
self.unit_files[InstallChange.LINES_SWAPPED] = unit_file_content
|
||||
@@ -51,9 +51,9 @@ class ExecutionResumeTest(unittest.TestCase):
|
||||
unit_file_content = f'''
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash -c "echo bar >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo bar >>{self.output_file}"
|
||||
ExecStart=/bin/sleep 3
|
||||
ExecStart=/bin/bash -c "echo foo >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo foo >>{self.output_file}"
|
||||
'''
|
||||
self.unit_files[InstallChange.COMMAND_ADDED_BEFORE] = unit_file_content
|
||||
|
||||
@@ -61,26 +61,26 @@ class ExecutionResumeTest(unittest.TestCase):
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sleep 3
|
||||
ExecStart=/bin/bash -c "echo foo >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo bar >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo foo >>{self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo bar >>{self.output_file}"
|
||||
'''
|
||||
self.unit_files[InstallChange.COMMAND_ADDED_AFTER] = unit_file_content
|
||||
|
||||
unit_file_content = f'''
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash -c "echo baz >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo baz >>{self.output_file}"
|
||||
ExecStart=/bin/sleep 3
|
||||
ExecStart=/bin/bash -c "echo foo >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo bar >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo foo >>{self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo bar >>{self.output_file}"
|
||||
'''
|
||||
self.unit_files[InstallChange.COMMAND_INTERLEAVED] = unit_file_content
|
||||
|
||||
unit_file_content = f'''
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash -c "echo bar >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo baz >> {self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo bar >>{self.output_file}"
|
||||
ExecStart=/bin/bash -c "echo baz >>{self.output_file}"
|
||||
'''
|
||||
self.unit_files[InstallChange.REMOVAL] = unit_file_content
|
||||
|
||||
|
||||
Reference in New Issue
Block a user