llvm-project/lldb/test
Pavel Labath df50f9440d Handle trailing spaces on "settings set" command more correctly
Summary:
Currently we have some settings which treat "\ " on settings set commands specially. E.g., it is
a valid way of specifying an argument of " " to a target. However, this fails if "\ " is the last
argument as CommandObjectSettingsSet strips trailing whitespace. This resulted in a surprising
argument of "\" to the target.

This patch disables the training whitespace removal at a global
level. Instead, for each argument type we locally determine whether whitespace stripping makes
sense. Currently, I strip whitespace for all simple object type except of regex and
format-string, with the rationale that these two object types do their own complex parsing and we
want to interfere with them as least as possible. Specifically, stripping the whitespace of a
regex "\ " will result in a (surprising?) error "trailing backslash". Furthermore, the default
value of dissasembly-format setting already contains a trailing space and there is no way for the
user to type this in manually if we strip whitespace.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D7592

llvm-svn: 229382
2015-02-16 13:13:39 +00:00
..
api Make OSX test run firewall friendly. 2015-01-22 20:03:21 +00:00
arm_emulation Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case. 2013-12-10 23:19:29 +00:00
attic Initial commit of a new testsuite feature: test categories. 2012-09-21 19:10:53 +00:00
benchmarks Add a benchmark test case that shows how much slower repeat 'continue' commands are than going through the SB API directly 2015-01-22 19:33:53 +00:00
driver/batch_mode XFAIL pexpect tests on Windows. 2015-01-20 22:36:03 +00:00
example Initial commit of a new testsuite feature: test categories. 2012-09-21 19:10:53 +00:00
expression_command Move several GetByteSize() calls over to the brave new world of taking an ExecutionContext* 2015-01-28 01:09:45 +00:00
functionalities Fix TestRegisters on remote target. 2015-02-16 06:17:51 +00:00
help Fix help test cases after r226068 2015-01-20 15:13:01 +00:00
lang Re-add makefiles of inline tests 2015-02-12 14:43:35 +00:00
linux/builtin_trap Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case. 2013-12-10 23:19:29 +00:00
logging I changed the logging test to just test that logging doesn't crash and does produce output. That's 2014-03-19 23:55:54 +00:00
macosx Remove shell-globbing from all test makefiles. 2014-07-31 21:03:11 +00:00
make Clean up dependency .d.$$$$ files for tests 2015-02-05 09:52:42 +00:00
pexpect-2.4 Eliminate kernel warning when running tests on FreeBSD 2014-02-18 21:33:10 +00:00
plugins Make the test runner understand Windows command shell execution. 2014-07-22 16:19:29 +00:00
python_api Fix TestProcessIO.py when run against a remote target 2015-02-13 19:15:24 +00:00
settings Handle trailing spaces on "settings set" command more correctly 2015-02-16 13:13:39 +00:00
source-manager During source manager test, write back the file using binary mode. 2015-01-15 22:53:44 +00:00
terminal XFAIL pexpect tests on Windows. 2015-01-20 22:36:03 +00:00
tools Rename MiStackTestCase tests according to "test_lldbmi_<command_name>" format 2015-02-16 13:00:59 +00:00
types Get test/types tests passing on remote targets 2015-02-04 22:25:34 +00:00
unittest2 Added a simple legend to the unit test 'dots' output, to aid understandability. 2013-09-25 20:47:51 +00:00
warnings/uuid Fixes a number of issue related to test portability on Windows. 2014-07-18 01:02:02 +00:00
.categories Initial commit of a new testsuite feature: test categories. 2012-09-21 19:10:53 +00:00
CMakeLists.txt Add a method to disable the Windows crash / assert dialogs. 2014-12-12 18:10:52 +00:00
Makefile Rename dosep.ty to dosep.py 2014-07-21 16:16:31 +00:00
README-TestSuite Fix typos. 2014-07-01 21:22:11 +00:00
argparse_compat.py Include a small argparse compatibility layer for Python < 2.7 2013-02-16 09:05:23 +00:00
bench-history
bench.py
blacklist.py
crashinfo.c Alignment fix 2014-01-08 03:14:18 +00:00
dosep.py Dont' use close_fds = True on Windows. 2015-02-07 00:14:55 +00:00
dotest.py test: Add workaround for FreeBSD libedit vs readline issue 2015-01-14 20:32:33 +00:00
lldbbench.py Tests decorated with @benchmarks_test do not participate in the remote-macosx test suite run. 2012-04-19 23:50:00 +00:00
lldbinline.py [InlineTest] getRerunArgs returns an empty string if the test was skipped. 2015-01-09 01:54:44 +00:00
lldbpexpect.py Add an expectall() API that allows you to pass a list of patterns and have pexpect match *ALL* of them instead of just picking one 2015-02-03 03:11:59 +00:00
lldbtest.py Except only EIO errors of OSError exception in Base.deletePexpectChild() in lldbtest.py after r227086 2015-02-11 21:41:58 +00:00
lldbutil.py Print the new eStopReasonExec in stop_reason_to_str. 2014-04-03 01:25:28 +00:00
progress.py The new progress bar mode was losing us information compared to the old dots mode in that we would have no way of knowing about test failures (short of peeking into the test result directory.. and you're not supposed to peek!) 2013-02-09 00:37:07 +00:00
redo.py The new ReadStringFromMemory() API does not work correctly with NSStrings that have an explicit length and no NULL terminator 2013-04-23 20:05:05 +00:00