1 # REQUIRES: system-windows
3 ## This checks that when starting lldb (or using `target create`) with a
4 ## program name which is on $PATH, or not specify the .exe suffix of a program
5 ## in the working directory on Windows, lldb can still detect the target
6 ## architecture correctly instead of producing an error.
8 # RUN: mkdir -p "%t.dir"
9 # RUN: %clang_host -g0 -O0 %S/Inputs/main.c -o %t.dir/testmain.exe
11 ## Test with full path to exe
12 # RUN: %lldb %t.dir/testmain.exe -b | FileCheck %s
14 ## Test with exe on path, with .exe suffix
15 # RUN: env PATH="%t.dir%{pathsep}%{PATH}" %lldb testmain.exe -b | FileCheck %s
17 ## Test with exe on path, without .exe suffix
18 # RUN: env PATH="%t.dir%{pathsep}%{PATH}" %lldb testmain -b | FileCheck %s
20 ## Test in cwd, with .exe suffix
21 # RUN: cd "%t.dir" && %lldb testmain.exe -b | FileCheck %s
23 ## Test in cwd, without .exe suffix
24 # RUN: cd "%t.dir" && %lldb testmain -b | FileCheck %s
26 # CHECK-LABEL: target create
27 # CHECK-NEXT: Current executable set to '{{.*[/\\]}}testmain.exe'