about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-08-21 17:12:32 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-08-21 17:20:43 -0700
commit996989cdb4c936ee3e41e65e6cd4d22c073206f9 (patch)
tree2bb682f738b546ebd5594576f18b63523a58f2fc
parentef8a5044ff26c8aab077a421b91231ce132e3ff5 (diff)
downloadrust-996989cdb4c936ee3e41e65e6cd4d22c073206f9.tar.gz
rust-996989cdb4c936ee3e41e65e6cd4d22c073206f9.zip
rustpkg: Add test for #7338. Closes #7338
-rw-r--r--src/librustpkg/tests.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/librustpkg/tests.rs b/src/librustpkg/tests.rs
index 1ff45aeb833..04a84f98c59 100644
--- a/src/librustpkg/tests.rs
+++ b/src/librustpkg/tests.rs
@@ -1034,6 +1034,18 @@ fn test_extern_mod() {
     assert!(os::path_exists(&exec_file) && is_executable(&exec_file));
 }
 
+#[test]
+fn test_import_rustpkg() {
+    let p_id = PkgId::new("foo");
+    let workspace = create_local_package(&p_id);
+    writeFile(&workspace.push("src").push("foo-0.1").push("pkg.rs"),
+              "extern mod rustpkg; fn main() {}");
+    command_line_test([~"build", ~"foo"], &workspace);
+    debug!("workspace = %s", workspace.to_str());
+    assert!(os::path_exists(&workspace.push("build").push("foo").push(fmt!("pkg%s",
+        os::EXE_SUFFIX))));
+}
+
 /// Returns true if p exists and is executable
 fn is_executable(p: &Path) -> bool {
     use std::libc::consts::os::posix88::{S_IXUSR};