diff options
| author | Andrei Formiga <archimedes_siracusa@hotmail.com> | 2013-11-08 16:53:04 -0300 |
|---|---|---|
| committer | Andrei Formiga <archimedes_siracusa@hotmail.com> | 2013-11-08 17:42:46 -0300 |
| commit | 23387b062deddc8ca44fcbde834b7ab0f4e6d832 (patch) | |
| tree | 9ad1033d45fc22dcd7593bd939af8dc1787e14d5 /src | |
| parent | cf24280a3c84d2ef2df73e810da409a0f8474919 (diff) | |
| download | rust-23387b062deddc8ca44fcbde834b7ab0f4e6d832.tar.gz rust-23387b062deddc8ca44fcbde834b7ab0f4e6d832.zip | |
Added tests for default generation of package_id meta attribute
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/auxiliary/crateresolve8-1.rs | 17 | ||||
| -rw-r--r-- | src/test/run-pass/crateresolve8.rs | 19 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/test/auxiliary/crateresolve8-1.rs b/src/test/auxiliary/crateresolve8-1.rs new file mode 100644 index 00000000000..22ccde01c4a --- /dev/null +++ b/src/test/auxiliary/crateresolve8-1.rs @@ -0,0 +1,17 @@ +// Copyright 2012 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// default link meta for 'package_id' will be equal to filestem +#[link(name = "crateresolve8", + vers = "0.1")]; + +#[crate_type = "lib"]; + +pub fn f() -> int { 20 } diff --git a/src/test/run-pass/crateresolve8.rs b/src/test/run-pass/crateresolve8.rs new file mode 100644 index 00000000000..8ade79a4a84 --- /dev/null +++ b/src/test/run-pass/crateresolve8.rs @@ -0,0 +1,19 @@ +// Copyright 2012 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// xfail-fast +// aux-build:crateresolve8-1.rs + +extern mod crateresolve8(vers = "0.1", package_id="crateresolve8"); +//extern mod crateresolve8(vers = "0.1"); + +pub fn main() { + assert_eq!(crateresolve8::f(), 20); +} |
