]> git.lizzy.rs Git - rust.git/commitdiff
rustpkg: Add test for #7348. Closes #7348
authorTim Chevalier <chevalier@alum.wellesley.edu>
Thu, 22 Aug 2013 01:04:08 +0000 (18:04 -0700)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Thu, 22 Aug 2013 01:05:10 +0000 (18:05 -0700)
src/librustpkg/tests.rs

index e70aab723c6ea0ae5361fd904d267fcff4635743..d130ef249ef1c7165223f1f7e23e8f24391fc7d9 100644 (file)
@@ -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};