about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJordi Boggiano <j.boggiano@seld.be>2013-07-30 18:35:45 +0200
committerJordi Boggiano <j.boggiano@seld.be>2013-07-30 18:40:01 +0200
commitf7ebab440322d9c2a20cd8c1e23db789ffdc8685 (patch)
treeab922d85833acce719d2c05d2d59d865a570bf53
parent576f395ddfe3a47859df0419a0366abf7a8c185b (diff)
downloadrust-f7ebab440322d9c2a20cd8c1e23db789ffdc8685.tar.gz
rust-f7ebab440322d9c2a20cd8c1e23db789ffdc8685.zip
Do not enforce two newlines after the options
-rw-r--r--src/compiletest/compiletest.rs2
-rw-r--r--src/libextra/getopts.rs4
-rw-r--r--src/libextra/test.rs1
3 files changed, 4 insertions, 3 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs
index 956e8aaad23..894a372ac64 100644
--- a/src/compiletest/compiletest.rs
+++ b/src/compiletest/compiletest.rs
@@ -85,6 +85,7 @@ pub fn parse_config(args: ~[~str]) -> config {
     if args[1] == ~"-h" || args[1] == ~"--help" {
         let message = fmt!("Usage: %s [OPTIONS] [TESTNAME...]", argv0);
         println(getopts::groups::usage(message, groups));
+        println("");
         fail!()
     }
 
@@ -97,6 +98,7 @@ pub fn parse_config(args: ~[~str]) -> config {
     if getopts::opt_present(matches, "h") || getopts::opt_present(matches, "help") {
         let message = fmt!("Usage: %s [OPTIONS]  [TESTNAME...]", argv0);
         println(getopts::groups::usage(message, groups));
+        println("");
         fail!()
     }
 
diff --git a/src/libextra/getopts.rs b/src/libextra/getopts.rs
index 8db32c8cca4..45c9078a90f 100644
--- a/src/libextra/getopts.rs
+++ b/src/libextra/getopts.rs
@@ -680,7 +680,7 @@ pub mod groups {
         return brief.to_owned() +
                "\n\nOptions:\n" +
                rows.collect::<~[~str]>().connect("\n") +
-               "\n\n";
+               "\n";
     }
 
     /** Splits a string into substrings with possibly internal whitespace,
@@ -1463,7 +1463,6 @@ Options:
     -k --kiwi           Desc
     -p [VAL]            Desc
     -l VAL              Desc
-
 ";
 
         let generated_usage = groups::usage("Usage: fruits", optgroups);
@@ -1492,7 +1491,6 @@ Options:
     -k --kiwi           This is a long description which won't be wrapped..+..
     -a --apple          This is a long description which _will_ be
                         wrapped..+..
-
 ";
 
         let usage = groups::usage("Usage: fruits", optgroups);
diff --git a/src/libextra/test.rs b/src/libextra/test.rs
index a5705d08b72..984a4d3a543 100644
--- a/src/libextra/test.rs
+++ b/src/libextra/test.rs
@@ -191,6 +191,7 @@ fn optgroups() -> ~[getopts::groups::OptGroup] {
 fn usage(binary: &str, helpstr: &str) -> ! {
     let message = fmt!("Usage: %s [OPTIONS] [FILTER]", binary);
     println(groups::usage(message, optgroups()));
+    println("");
     if helpstr == "help" {
         println("\
 The FILTER is matched against the name of all tests to run, and if any tests