Skip to content

Commit

Permalink
[ELF][test] Improve -v and --version tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Sep 21, 2022
1 parent 636de2b commit bd6e018
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lld/test/ELF/driver.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
# HELP: USAGE:
# HELP: : supported targets:{{.*}} elf

# RUN: ld.lld --version 2>&1 | FileCheck -check-prefix=VERSION %s
# RUN: ld.lld -v 2>&1 | FileCheck -check-prefix=VERSION %s
# RUN: not ld.lld -v xyz 2>&1 | FileCheck -check-prefix=VERSION %s
# VERSION: LLD {{.*}} (compatible with GNU linkers)

# RUN: not ld.lld --versin 2>&1 | FileCheck -check-prefix=SPELLVERSION %s
# SPELLVERSION: unknown argument '--versin', did you mean '--version'

Expand Down
9 changes: 9 additions & 0 deletions lld/test/ELF/version.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## --version skips input file processing.
# RUN: ld.lld --version %t/not-exist 2>&1 | FileCheck %s

## -v/-V don't skip processing if there is any input.
# RUN: ld.lld -v 2>&1 | FileCheck %s
# RUN: not ld.lld -v %t/not-exist 2>&1 | FileCheck %s
# RUN: ld.lld -V 2>&1 | FileCheck %s

# CHECK: LLD {{.*}} (compatible with GNU linkers)

0 comments on commit bd6e018

Please sign in to comment.