Skip to content

Commit 996989c

Browse files
committed
rustpkg: Add test for #7338. Closes #7338
1 parent ef8a504 commit 996989c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/librustpkg/tests.rs

+12
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,18 @@ fn test_extern_mod() {
10341034
assert!(os::path_exists(&exec_file) && is_executable(&exec_file));
10351035
}
10361036

1037+
#[test]
1038+
fn test_import_rustpkg() {
1039+
let p_id = PkgId::new("foo");
1040+
let workspace = create_local_package(&p_id);
1041+
writeFile(&workspace.push("src").push("foo-0.1").push("pkg.rs"),
1042+
"extern mod rustpkg; fn main() {}");
1043+
command_line_test([~"build", ~"foo"], &workspace);
1044+
debug!("workspace = %s", workspace.to_str());
1045+
assert!(os::path_exists(&workspace.push("build").push("foo").push(fmt!("pkg%s",
1046+
os::EXE_SUFFIX))));
1047+
}
1048+
10371049
/// Returns true if p exists and is executable
10381050
fn is_executable(p: &Path) -> bool {
10391051
use std::libc::consts::os::posix88::{S_IXUSR};

0 commit comments

Comments
 (0)