xref: /llvm-project/lldb/test/Shell/ScriptInterpreter/Python/command_import.test (revision 3338819b08faa7f23f65fb4e67154583984ebf5c)
1*d6e80578SJonas Devlieghere# RUN: rm -rf %t && mkdir -p %t
2*d6e80578SJonas Devlieghere# RUN: echo "print('Rene Magritte')" >> %t/foo.py
3*d6e80578SJonas Devlieghere# RUN: echo "print('Jan van Eyck')" >> %t/foo-bar.py
4*d6e80578SJonas Devlieghere# RUN: echo "print('Pieter Bruegel the Elder')" >> %t/foo.bar.py
5*d6e80578SJonas Devlieghere# RUN: echo "print('Pieter Bruegel the Younger')" >> %t/foo.bar
6*d6e80578SJonas Devlieghere
7*d6e80578SJonas Devlieghere# RUN: %lldb --script-language python -o 'command script import %t/foo.py' 2>&1 | FileCheck %s --check-prefix MAGRITTE
8*d6e80578SJonas Devlieghere# MAGRITTE: Rene Magritte
9*d6e80578SJonas Devlieghere
10*d6e80578SJonas Devlieghere# RUN: %lldb --script-language python -o 'command script import %t/foo-bar.py' 2>&1 | FileCheck %s --check-prefix VANEYCK
11*d6e80578SJonas Devlieghere# VANEYCK-NOT: Jan van Eyck
12*d6e80578SJonas Devlieghere# VANEYCK: module importing failed: Python discourages dashes in module names: foo-bar
13*d6e80578SJonas Devlieghere
14*d6e80578SJonas Devlieghere# RUN: %lldb --script-language python -o 'command script import %t/foo.bar.py' 2>&1 | FileCheck %s --check-prefix BRUEGEL
15*d6e80578SJonas Devlieghere# RUN: %lldb --script-language python -o 'command script import %t/foo.bar' 2>&1 | FileCheck %s --check-prefix BRUEGEL
16*d6e80578SJonas Devlieghere# BRUEGEL-NOT: Pieter Bruegel the Elder
17*d6e80578SJonas Devlieghere# BRUEGEL-NOT: Pieter Bruegel the Younger
18*d6e80578SJonas Devlieghere# BRUEGEL: module importing failed: Python does not allow dots in module names: foo.bar
19