Skip to content

Commit a9aa4ad

Browse files
committed
rustpkg: Add test for #7348. Closes #7348
1 parent 5fd47c7 commit a9aa4ad

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
@@ -1047,6 +1047,18 @@ fn test_import_rustpkg() {
10471047
os::EXE_SUFFIX))));
10481048
}
10491049

1050+
#[test]
1051+
fn test_macro_pkg_script() {
1052+
let p_id = PkgId::new("foo");
1053+
let workspace = create_local_package(&p_id);
1054+
writeFile(&workspace.push("src").push("foo-0.1").push("pkg.rs"),
1055+
"extern mod rustpkg; fn main() { debug!(\"Hi\"); }");
1056+
command_line_test([~"build", ~"foo"], &workspace);
1057+
debug!("workspace = %s", workspace.to_str());
1058+
assert!(os::path_exists(&workspace.push("build").push("foo").push(fmt!("pkg%s",
1059+
os::EXE_SUFFIX))));
1060+
}
1061+
10501062
/// Returns true if p exists and is executable
10511063
fn is_executable(p: &Path) -> bool {
10521064
use std::libc::consts::os::posix88::{S_IXUSR};

0 commit comments

Comments
 (0)