xref: /llvm-project/lldb/test/Shell/Commands/command-target-create-resolve-exe.test (revision 20c4e95b9c03a77c2e5ce5f354114752d380c591)
1# REQUIRES: target-windows
2
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.
7
8# RUN: mkdir -p "%t.dir"
9# RUN: %clang_host -g0 -O0 %S/Inputs/main.c -o %t.dir/testmain.exe
10
11## Test with full path to exe
12# RUN: %lldb %t.dir/testmain.exe -b | FileCheck %s
13
14## Test with exe on path, with .exe suffix
15# RUN: env PATH="%t.dir%{pathsep}%{PATH}" %lldb testmain.exe -b | FileCheck %s
16
17## Test with exe on path, without .exe suffix
18# RUN: env PATH="%t.dir%{pathsep}%{PATH}" %lldb testmain -b | FileCheck %s
19
20## Test in cwd, with .exe suffix
21# RUN: cd "%t.dir" && %lldb testmain.exe -b | FileCheck %s
22
23## Test in cwd, without .exe suffix
24# RUN: cd "%t.dir" && %lldb testmain -b | FileCheck %s
25
26# CHECK-LABEL: target create
27# CHECK-NEXT: Current executable set to '{{.*[/\\]}}testmain.exe'
28# CHECK-NOT: Error
29