We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d59218 commit f6be432Copy full SHA for f6be432
nipype/interfaces/base/tests/test_core.py
@@ -608,3 +608,19 @@ def _run_interface(self, runtime):
608
609
with pytest.raises(RuntimeError):
610
BrokenRuntime().run()
611
+
612
613
+def test_CommandLine_escape(tmp_path):
614
+ test_file = tmp_path / "test file.txt"
615
+ test_file.write_text("content")
616
617
+ class InputSpec(nib.TraitedSpec):
618
+ in_file = nib.File(desc="a file", exists=True, argstr="%s")
619
620
+ class CatCommand(nib.CommandLine):
621
+ input_spec = InputSpec
622
+ _cmd = "cat"
623
624
+ command = CatCommand(in_file=str(test_file))
625
+ result = command.run()
626
+ assert result.runtime.stdout == "content"
0 commit comments