Files
clang-p2996/lldb/lit/Settings/TestSettingsSet.test
Jonas Devlieghere 9c6c201b58 [Settings] Add -force flag to "settings set"
The -force option allows you to pass an empty value to settings set to
reset the value to its default. This means that the following operations
are equivalent:

  settings set -f <setting>
  settings clear <setting>

The motivation for this change is the ability to export and import
settings from LLDB. Because of the way the dumpers work, we don't know
whether a value is going to be the default or not. Hence we cannot use
settings clear and use settings set -f, potentially providing an empty
value.

Differential revision: https://reviews.llvm.org/D52772

llvm-svn: 345207
2018-10-24 22:04:20 +00:00

16 lines
388 B
Plaintext

# This tests setting setting values.
# Check that setting an empty value with -f(orce) clears the value.
# RUN: %lldb -b -s %s 2>&1 | FileCheck %s
settings set tab-size 16
settings show tab-size
# CHECK: tab-size (unsigned) = 16
settings set -f tab-size
settings show tab-size
# CHECK: tab-size (unsigned) = 4
settings set tab-size
# CHECK: error: 'settings set' takes more arguments