brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 72dcd73 Raw
33 lines · plain
1# This tests writing and reading settings from LLDB.2 3# Check that the settings can be written to file and read again without4# altering the values.5# RUN: %lldb -b -o 'settings write -f %t.foo' -o 'settings read -f %t.foo' -o 'settings write -f %t.bar' -o 'settings read -f %t.bar' 2>&1 | FileCheck %s --check-prefix SUCCESS6# RUN: diff -w %t.foo %t.bar7# SUCCESS-NOT: error:8 9# Check that exporting target settings only export target settings and nothing else.10# RUN: %lldb -b -o 'settings write -f %t.target target' 2>&1 | FileCheck %s --check-prefix SUCCESS11# RUN: cat %t.target | FileCheck %s --check-prefix TARGET12# TARGET: settings set -f target13# TARGET-NOT: settings set -f platform14# TARGET-NOT: settings set -f symbols15# TARGET-NOT: settings set -f interpreter16# TARGET-NOT: settings set -f plugin17 18# Check that settings appear twice when appending.19# RUN: %lldb -b -o 'settings write -a -f %t.append target' -o 'settings write -a -f %t.append target' 2>&1 | FileCheck %s --check-prefix SUCCESS20# RUN: cat %t.append | FileCheck %s --check-prefix APPEND21# APPEND: settings set -f target.language22# APPEND: settings set -f target.language23 24# Check that an error is printed for non-existing setting.25# RUN: echo "settings set -f bogus" > %t.bogus_setting26# RUN: %lldb -b -o 'settings read -f %t.bogus_setting' 2>&1 | FileCheck %s --check-prefix BOGUS-SETTING27# BOGUS-SETTING: error: invalid value path28 29# Check that an error is printed for invalid value.30# RUN: echo "settings set -f target.language bogus" > %t.bogus_value31# RUN: %lldb -b -o 'settings read -f %t.bogus_value' 2>&1 | FileCheck %s --check-prefix BOGUS-VALUE32# BOGUS-VALUE: error: invalid language type33