Skip to content

Commit ff006a5

Browse files
committed
---
yaml --- r: 80701 b: refs/heads/try c: a018a5c h: refs/heads/master i: 80699: ffc5e5b v: v3
1 parent c6860dc commit ff006a5

File tree

5 files changed

+15
-27
lines changed

5 files changed

+15
-27
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cbd1eefbd350797b783df119fed7956d7e1c74ad
5-
refs/heads/try: 68a9137eacb7ea1e61f80279eff03bf758e16e71
5+
refs/heads/try: a018a5c3433e20a56f642082586f4e4d28469381
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libextra/fileinput.rs

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -417,23 +417,20 @@ mod test {
417417

418418
use super::{FileInput, make_path_option_vec, input_vec, input_vec_state};
419419

420-
use std::rt::io;
421-
use std::rt::io::Writer;
422-
use std::rt::io::file;
420+
use std::io;
423421
use std::uint;
424422
use std::vec;
425423

426424
fn make_file(path : &Path, contents: &[~str]) {
427-
let mut file = file::open(path, io::CreateOrTruncate, io::Write).unwrap();
425+
let file = io::file_writer(path, [io::Create, io::Truncate]).unwrap();
428426

429427
for str in contents.iter() {
430-
file.write(str.as_bytes());
431-
file.write(['\n' as u8]);
428+
file.write_str(*str);
429+
file.write_char('\n');
432430
}
433431
}
434432

435433
#[test]
436-
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
437434
fn test_make_path_option_vec() {
438435
let strs = [~"some/path",
439436
~"some/other/path"];
@@ -448,7 +445,6 @@ mod test {
448445
}
449446
450447
#[test]
451-
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
452448
fn test_fileinput_read_byte() {
453449
let filenames = make_path_option_vec(vec::from_fn(
454450
3,
@@ -479,7 +475,6 @@ mod test {
479475
}
480476
481477
#[test]
482-
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
483478
fn test_fileinput_read() {
484479
let filenames = make_path_option_vec(vec::from_fn(
485480
3,
@@ -500,7 +495,6 @@ mod test {
500495
}
501496

502497
#[test]
503-
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
504498
fn test_input_vec() {
505499
let mut all_lines = ~[];
506500
let filenames = make_path_option_vec(vec::from_fn(
@@ -524,7 +518,6 @@ mod test {
524518
}
525519

526520
#[test]
527-
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
528521
fn test_input_vec_state() {
529522
let filenames = make_path_option_vec(vec::from_fn(
530523
3,
@@ -547,7 +540,6 @@ mod test {
547540
}
548541

549542
#[test]
550-
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
551543
fn test_empty_files() {
552544
let filenames = make_path_option_vec(vec::from_fn(
553545
3,
@@ -572,21 +564,18 @@ mod test {
572564
}
573565
574566
#[test]
575-
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
576567
fn test_no_trailing_newline() {
577568
let f1 =
578569
Some(Path("tmp/lib-fileinput-test-no-trailing-newline-1.tmp"));
579570
let f2 =
580571
Some(Path("tmp/lib-fileinput-test-no-trailing-newline-2.tmp"));
581572
582-
{
583-
let mut wr = file::open(f1.get_ref(), io::CreateOrTruncate,
584-
io::Write).unwrap();
585-
wr.write("1\n2".as_bytes());
586-
let mut wr = file::open(f2.get_ref(), io::CreateOrTruncate,
587-
io::Write).unwrap();
588-
wr.write("3\n4".as_bytes());
589-
}
573+
let wr = io::file_writer(f1.get_ref(),
574+
[io::Create, io::Truncate]).unwrap();
575+
wr.write_str("1\n2");
576+
let wr = io::file_writer(f2.get_ref(),
577+
[io::Create, io::Truncate]).unwrap();
578+
wr.write_str("3\n4");
590579
591580
let mut lines = ~[];
592581
do input_vec(~[f1, f2]) |line| {
@@ -598,7 +587,6 @@ mod test {
598587
599588
600589
#[test]
601-
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
602590
fn test_next_file() {
603591
let filenames = make_path_option_vec(vec::from_fn(
604592
3,
@@ -630,7 +618,6 @@ mod test {
630618
631619
#[test]
632620
#[should_fail]
633-
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
634621
fn test_input_vec_missing_file() {
635622
do input_vec(make_path_option_vec([~"this/file/doesnt/exist"], true)) |line| {
636623
println(line);

branches/try/src/libstd/fmt/parse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ impl<'self> Parser<'self> {
554554
/// characters.
555555
fn word(&mut self) -> &'self str {
556556
let start = match self.cur.clone().next() {
557-
Some((pos, c)) if char::is_alphabetic(c) => {
557+
Some((pos, c)) if char::is_XID_start(c) => {
558558
self.cur.next();
559559
pos
560560
}
@@ -563,7 +563,7 @@ impl<'self> Parser<'self> {
563563
let mut end;
564564
loop {
565565
match self.cur.clone().next() {
566-
Some((_, c)) if char::is_alphanumeric(c) => {
566+
Some((_, c)) if char::is_XID_continue(c) => {
567567
self.cur.next();
568568
}
569569
Some((pos, _)) => { end = pos; break }

branches/try/src/libstd/rt/io/net/tcp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl Writer for TcpStream {
9393
}
9494
}
9595

96-
fn flush(&mut self) { fail!() }
96+
fn flush(&mut self) { /* no-op */ }
9797
}
9898

9999
pub struct TcpListener(~RtioTcpListenerObject);

branches/try/src/test/run-pass/ifmt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ pub fn main() {
8282
t!(format!("{foo} {1} {bar} {0}", 0, 1, foo=2, bar=3), "2 1 3 0");
8383
t!(format!("{} {0:s}", "a"), "a a");
8484
t!(format!("{} {0}", "a"), "a a");
85+
t!(format!("{foo_bar}", foo_bar=1), "1");
8586

8687
// Methods should probably work
8788
t!(format!("{0, plural, =1{a#} =2{b#} zero{c#} other{d#}}", 0u), "c0");

0 commit comments

Comments
 (0)