Skip to content

Commit 2efc335

Browse files
committed
add test_visible_symbols() based on good_lib
1 parent 61a4a2a commit 2efc335

File tree

1 file changed

+13
-0
lines changed
  • crates/symbol-check/tests

1 file changed

+13
-0
lines changed

crates/symbol-check/tests/all.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,19 @@ fn test_core_symbols() {
7575
.stderr_contains("from_utf8");
7676
}
7777

78+
#[test]
79+
fn test_visible_symbols() {
80+
let t = TestTarget::from_env();
81+
let dir = tempdir().unwrap();
82+
let lib_out = dir.path().join("libfoo.rlib");
83+
t.rustc_build(&input_dir().join("good_lib.rs"), &lib_out, |cmd| cmd);
84+
let assert = t.symcheck_exe().arg(&lib_out).assert();
85+
assert
86+
.failure()
87+
.stderr_contains("found 1 visible symbols")
88+
.stderr_contains("name: \"good\"");
89+
}
90+
7891
mod exe_stack {
7992
use super::*;
8093

0 commit comments

Comments
 (0)