Skip to content

Commit

Permalink
Add some UI tests for -l modifier parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalathar committed Nov 18, 2024
1 parent 9d6b228 commit 2902bca
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/ui/native-library-link-flags/modifiers-bad.blank.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
error: invalid linking modifier syntax, expected '+' or '-' prefix before one of: bundle, verbatim, whole-archive, as-needed

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
error: invalid linking modifier syntax, expected '+' or '-' prefix before one of: bundle, verbatim, whole-archive, as-needed

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
error: unknown linking modifier ``, expected one of: bundle, verbatim, whole-archive, as-needed

11 changes: 11 additions & 0 deletions tests/ui/native-library-link-flags/modifiers-bad.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//@ edition: 2021
//@ revisions: blank no-prefix prefix-only unknown

//@[blank] compile-flags: -l static:=foo
//@[no-prefix] compile-flags: -l static:bundle=foo
//@[prefix-only] compile-flags: -l static:+=foo
//@[unknown] compile-flags: -l static:+ferris=foo

// Tests various illegal values for the "modifier" part of an `-l` flag.

fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
error: unknown linking modifier `ferris`, expected one of: bundle, verbatim, whole-archive, as-needed

0 comments on commit 2902bca

Please sign in to comment.