diff --git a/src/librustpkg/testsuite/pass/deeply/nested/path/foo/main.rs b/src/librustpkg/testsuite/pass/deeply/nested/path/foo/main.rs new file mode 100644 index 000000000000..41041ccb5091 --- /dev/null +++ b/src/librustpkg/testsuite/pass/deeply/nested/path/foo/main.rs @@ -0,0 +1,18 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +/* +The test runner should check that, after `rustpkg install deeply/nested/path/foo`: + with RUST_PATH undefined in the environment: + * ./deeply/nested/path/foo exists and is an executable +*/ + +fn main() {} + diff --git a/src/librustpkg/testsuite/pass/external-crate/main.rs b/src/librustpkg/testsuite/pass/external-crate/main.rs new file mode 100644 index 000000000000..d094bcd6bba6 --- /dev/null +++ b/src/librustpkg/testsuite/pass/external-crate/main.rs @@ -0,0 +1,21 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +/* +The test runner should check that, after `rustpkg install external crate` + with RUST_PATH undefined in the environment + and with `rustpkg install deeply/nested/path/foo` already + executed: + * ./.rust/external_crate exists and is an executable +*/ + +extern mod foo; // refers to deeply/nested/path/foo + +fn main() {} diff --git a/src/librustpkg/testsuite/pass/install-paths/bench.rs b/src/librustpkg/testsuite/pass/install-paths/bench.rs new file mode 100644 index 000000000000..5aa6d2455cf3 --- /dev/null +++ b/src/librustpkg/testsuite/pass/install-paths/bench.rs @@ -0,0 +1,7 @@ +#[bench] +fn g() { + let mut x = 0; + while(x < 1000) { + x += 1; + } +} \ No newline at end of file diff --git a/src/librustpkg/testsuite/pass/install-paths/lib.rs b/src/librustpkg/testsuite/pass/install-paths/lib.rs new file mode 100644 index 000000000000..baf90446f7aa --- /dev/null +++ b/src/librustpkg/testsuite/pass/install-paths/lib.rs @@ -0,0 +1,11 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn f() -> int { 42 } diff --git a/src/librustpkg/testsuite/pass/install-paths/main.rs b/src/librustpkg/testsuite/pass/install-paths/main.rs new file mode 100644 index 000000000000..37e606dcb1ab --- /dev/null +++ b/src/librustpkg/testsuite/pass/install-paths/main.rs @@ -0,0 +1,22 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +/* +The test runner should check that, after `rustpkg install install-paths` + with RUST_PATH undefined in the environment: + * ./.rust/install_paths exists and is an executable + * ./.rust/libinstall_paths exists and is a library + * ./.rust/install_pathstest does not exist + * ./.rust/install_pathsbench does not exist + * install-paths/build/install_pathstest exists and is an executable + * install-paths/build/install_pathsbench exists and is an executable +*/ + +fn main() {} diff --git a/src/librustpkg/testsuite/pass/install-paths/test.rs b/src/librustpkg/testsuite/pass/install-paths/test.rs new file mode 100644 index 000000000000..acfae9e04fb5 --- /dev/null +++ b/src/librustpkg/testsuite/pass/install-paths/test.rs @@ -0,0 +1,14 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[test] +fn test_two_plus_two() { + assert!(2 + 2 == 4); +}