Skip to content

Commit

Permalink
getopts: fixed a failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcterus committed Feb 6, 2014
1 parent 2ce7019 commit 968ce53
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/libgetopts/lib.rs
Expand Up @@ -31,7 +31,7 @@
//!
//! ~~~{.rust}
//! extern mod getopts;
//! use getopts::{optopt,optflag,getopts,Opt};
//! use getopts::{optopt,optflag,getopts,OptGroup};
//! use std::os;
//!
//! fn do_work(inp: &str, out: Option<~str>) {
Expand All @@ -42,7 +42,7 @@
//! }
//! }
//!
//! fn print_usage(program: &str, _opts: &[Opt]) {
//! fn print_usage(program: &str, _opts: &[OptGroup]) {
//! println!("Usage: {} [options]", program);
//! println!("-o\t\tOutput");
//! println!("-h --help\tUsage");
Expand All @@ -54,15 +54,14 @@
//! let program = args[0].clone();
//!
//! let opts = ~[
//! optopt("o"),
//! optflag("h"),
//! optflag("help")
//! optopt("o", "", "set output file name", "NAME"),
//! optflag("h", "help", "print this help menu")
//! ];
//! let matches = match getopts(args.tail(), opts) {
//! Ok(m) => { m }
//! Err(f) => { fail!(f.to_err_msg()) }
//! };
//! if matches.opt_present("h") || matches.opt_present("help") {
//! if matches.opt_present("h") {
//! print_usage(program, opts);
//! return;
//! }
Expand Down

5 comments on commit 968ce53

@bors
Copy link
Contributor

@bors bors commented on 968ce53 Feb 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from cmr
at Arcterus@968ce53

@bors
Copy link
Contributor

@bors bors commented on 968ce53 Feb 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging Arcterus/rust/libgetopts = 968ce53 into auto

@bors
Copy link
Contributor

@bors bors commented on 968ce53 Feb 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arcterus/rust/libgetopts = 968ce53 merged ok, testing candidate = 680925e

@bors
Copy link
Contributor

@bors bors commented on 968ce53 Feb 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 968ce53 Feb 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 680925e

Please sign in to comment.