diff options
-rw-r--r-- | lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test | 2 | ||||
-rw-r--r-- | lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test b/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test index 5aaaac03793..a653b74200d 100644 --- a/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test +++ b/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test @@ -1,5 +1,3 @@ -# UNSUPPORTED: system-windows - # Test that LLDB correctly allows scripted commands to set immediate output to # a file. diff --git a/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py b/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py index e0c24055c83..14add9943dc 100644 --- a/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py +++ b/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py @@ -1,16 +1,19 @@ from __future__ import print_function import sys -import shlex +def split(command): + command = command.strip() + return command.rsplit(' ', 1) + def command_function(debugger, command, exe_ctx, result, internal_dict): result.SetImmediateOutputFile(sys.__stdout__) print('this is a test string, just a test string', file=result) def write_file(debugger, command, exe_ctx, result, internal_dict): - args = shlex.split(command) + args = split(command) path = args[0] mode = args[1] with open(path, mode) as f: |