about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-08-21 18:04:08 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-08-21 18:05:10 -0700
commita9aa4ad2a017f5ed1655917fe8a6bb66591d7025 (patch)
tree45576e9a5341852ff96a3e369fa843e3a4b6709b
parent5fd47c7aac811763ac20e3573ef79f27295a6109 (diff)
downloadrust-a9aa4ad2a017f5ed1655917fe8a6bb66591d7025.tar.gz
rust-a9aa4ad2a017f5ed1655917fe8a6bb66591d7025.zip
rustpkg: Add test for #7348. Closes #7348
-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 e70aab723c6..d130ef249ef 100644
--- a/src/librustpkg/tests.rs
+++ b/src/librustpkg/tests.rs
@@ -1047,6 +1047,18 @@ fn test_import_rustpkg() {
         os::EXE_SUFFIX))));
 }
 
+#[test]
+fn test_macro_pkg_script() {
+    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() { debug!(\"Hi\"); }");
+    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};