Skip to content

Commit 338d6ef

Browse files
committed
---
yaml --- r: 63665 b: refs/heads/snap-stage3 c: 3c86711 h: refs/heads/master i: 63663: eb6a56d v: v3
1 parent c4465c2 commit 338d6ef

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 13e5f0ebdfa7305e8449a585aa8e9837703f1f96
4+
refs/heads/snap-stage3: 3c867114525068275bd403ba5b1918d507a38933
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustpkg/tests.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,12 @@ fn output_file_name(workspace: &Path, short_name: &str) -> Path {
268268
workspace.push(fmt!("%s%s", short_name, os::EXE_SUFFIX))
269269
}
270270

271-
fn touch_source_file(workspace: &Path, short_name: &str) {
271+
fn touch_source_file(workspace: &Path, pkgid: &PkgId) {
272272
use conditions::bad_path::cond;
273-
let pkg_src_dir = workspace.push("src").push(short_name);
274-
let contents = os::list_dir(&pkg_src_dir);
273+
let pkg_src_dir = workspace.push("src").push(pkgid.to_str());
274+
let contents = os::list_dir_path(&pkg_src_dir);
275275
for contents.iter().advance |p| {
276-
if Path(copy *p).filetype() == Some(~".rs") {
276+
if p.filetype() == Some(~".rs") {
277277
// should be able to do this w/o a process
278278
if run::process_output("touch", [p.to_str()]).status != 0 {
279279
let _ = cond.raise((copy pkg_src_dir, ~"Bad path"));
@@ -287,20 +287,19 @@ fn touch_source_file(workspace: &Path, short_name: &str) {
287287
fn frob_source_file(workspace: &Path, pkgid: &PkgId) {
288288
use conditions::bad_path::cond;
289289
let pkg_src_dir = workspace.push("src").push(pkgid.to_str());
290-
let contents = os::list_dir(&pkg_src_dir);
290+
let contents = os::list_dir_path(&pkg_src_dir);
291291
let mut maybe_p = None;
292292
for contents.iter().advance |p| {
293-
if Path(copy *p).filetype() == Some(~".rs") {
293+
if p.filetype() == Some(~".rs") {
294294
maybe_p = Some(p);
295295
break;
296296
}
297297
}
298298
match maybe_p {
299299
Some(p) => {
300-
let p = Path(copy *p);
301-
let w = io::buffered_file_writer(&p);
300+
let w = io::file_writer(*p, &[io::Append]);
302301
match w {
303-
Err(s) => { let _ = cond.raise((p, fmt!("Bad path: %s", s))); }
302+
Err(s) => { let _ = cond.raise((copy **p, fmt!("Bad path: %s", s))); }
304303
Ok(w) => w.write_line("")
305304
}
306305
}
@@ -615,7 +614,7 @@ fn do_rebuild_dep_dates_change() {
615614
let workspace = create_local_package_with_dep(&p_id, &dep_id);
616615
command_line_test([~"build", ~"foo"], &workspace);
617616
let bar_date = datestamp(&lib_output_file_name(&workspace, "build", "bar"));
618-
touch_source_file(&workspace, "bar");
617+
touch_source_file(&workspace, &dep_id);
619618
command_line_test([~"build", ~"foo"], &workspace);
620619
let new_bar_date = datestamp(&lib_output_file_name(&workspace, "build", "bar"));
621620
assert!(new_bar_date > bar_date);

0 commit comments

Comments
 (0)