Skip to content

Commit 546c72a

Browse files
committed
[llvm-ranlib] Update expected error message check for Windows
On Windows hosts, the error message will be something like `c:\src\llvm-project\out\gn\bin\llvm-ranlib.exe: error: Invalid option: '--D'`. Due to the .exe after llvm-ranlib the existing CHECK lines do not match. Fix this by ignoring the program name and starting the check line at "error:".
1 parent 87fb204 commit 546c72a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/test/tools/llvm-ranlib/D-flag.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@
2929
## Check that the -D/-U option is only accepted with a single dash. This matches
3030
## the GNU ranlib behaviour.
3131
# RUN: not llvm-ranlib --D %t.a 2>&1 | FileCheck %s --check-prefix=BAD-OPT-D
32-
# BAD-OPT-D: llvm-ranlib: error: Invalid option: '--D'
32+
# BAD-OPT-D: error: Invalid option: '--D'
3333
# RUN: not llvm-ranlib --U %t.a 2>&1 | FileCheck %s --check-prefix=BAD-OPT-U
34-
# BAD-OPT-U: llvm-ranlib: error: Invalid option: '--U'
34+
# BAD-OPT-U: error: Invalid option: '--U'
3535
# RUN: not llvm-ranlib -x %t.a 2>&1 | FileCheck %s --check-prefix=BAD-OPT-x
36-
# BAD-OPT-x: llvm-ranlib: error: Invalid option: '-x'
36+
# BAD-OPT-x: error: Invalid option: '-x'
3737

3838
## If the first argument starts with value flags, the error message only shows
3939
## the remainder of the parsed string:
4040
# RUN: not llvm-ranlib -Dx %t.a 2>&1 | FileCheck %s --check-prefix=BAD-OPT-x
4141
# RUN: not llvm-ranlib -DxD %t.a 2>&1 | FileCheck %s --check-prefix=BAD-OPT-xD
42-
# BAD-OPT-xD: llvm-ranlib: error: Invalid option: '-xD'
42+
# BAD-OPT-xD: error: Invalid option: '-xD'
4343

4444
# DETERMINISTIC-VALUES: {{[rwx-]+}} 0/0 712 Jan 1 00:00 1970 D-flag.test.tmp.o
4545
# REAL-VALUES: {{[rwx-]+}} {{[0-9]+}}/{{[0-9]+}} 712 Jan 2 03:04 2000 D-flag.test.tmp.o

0 commit comments

Comments
 (0)