mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-25 02:28:18 +00:00
[test] Fix & re-enable CommandScriptImmediateOutputFile on Windows
Apparently the shlex module produces garbage on Windows. I've added a hand rolled split instead that should suffice for this test. llvm-svn: 358216
This commit is contained in:
parent
586fad50ac
commit
bb6e3f6be7
@ -1,5 +1,3 @@
|
||||
# UNSUPPORTED: system-windows
|
||||
|
||||
# Test that LLDB correctly allows scripted commands to set immediate output to
|
||||
# a file.
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user