* Mono.Options/Options.cs: GetLineEnd() shouldn't skip the start
authorJonathan Pryor <jpryor@novell.com>
Sun, 19 Apr 2009 18:35:56 +0000 (18:35 -0000)
committerJonathan Pryor <jpryor@novell.com>
Sun, 19 Apr 2009 18:35:56 +0000 (18:35 -0000)
  character, as it may contain '\n' (thus preventing the following text
  from being properly indented).
* Test/Mono.Options/OptionSetTest.cs: Add test to check \n\n
  Option.Description handling.

svn path=/trunk/mcs/; revision=132102

mcs/class/Mono.Options/Mono.Options/ChangeLog
mcs/class/Mono.Options/Mono.Options/Options.cs
mcs/class/Mono.Options/Test/Mono.Options/ChangeLog
mcs/class/Mono.Options/Test/Mono.Options/OptionSetTest.cs

index 25c4988ff19eb89affea37d16a411358e78292a9..c343d97d2dc1c65d9f655e8faf1139e41839b3cc 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-18  Jonathan Pryor  <jpryor@novell.com>
+
+       * Options.cs: GetLineEnd() shouldn't skip the start character, as it
+         may contain '\n' (thus preventing the following text from being
+         properly indented).
+
 2009-04-17  Jonathan Pryor  <jpryor@novell.com>
 
        * Options.cs: Viktor Lundgren reported that Option.Description text of 
index ec6ea187a1a5226337064a0c67a502e7696b7485..b22bd87af889eafe2a841db5c361319a3c64a016 100644 (file)
@@ -1086,7 +1086,7 @@ namespace Mono.Options
                {
                        int end = System.Math.Min (start + length, description.Length);
                        int sep = -1;
-                       for (int i = start+1; i < end; ++i) {
+                       for (int i = start; i < end; ++i) {
                                if (description [i] == '\n')
                                        return i+1;
                                if (IsEolChar (description [i]))
index 21c275033570e644e7eb09b46c4cfe897808ba36..b1fdfbdf9bfec161e007f391855f25b16843aace 100644 (file)
@@ -1,3 +1,7 @@
+2008-04-18  Jonathan Pryor  <jpryor@novell.com>
+
+       * OptionSetTest.cs: Add test to check \n\n Option.Description handling.
+
 2008-04-17  Jonathan Pryor  <jpryor@novell.com>
 
        * OptionSetTest.cs: Add additional line breaking tests.  
index 5fe6fe1561b68c98314fd15913dbd7d7e02df619..66ae933cd8b43e76bb258cf26cf128cba5dde75d 100644 (file)
@@ -300,6 +300,10 @@ namespace Tests.Mono.Options
                                { "long-desc5",
                                        "Lots of spaces in the middle - . - . - . - . - . - . - . - and more until the end.",
                                        v => {} },
+                               { "o|out=",
+                                       "The {DIRECTORY} to place the generated files and directories.\n\n" +
+                                       "If not specified, defaults to\n`dirname FILE`/cache/`basename FILE .tree`.",
+                                       v => {} },
                                { "h|?|help",           "show help text",                       v => {} },
                                { "version",            "output version information and exit",  v => {} },
                                { "<>", v => {} },
@@ -329,6 +333,11 @@ namespace Tests.Mono.Options
                        expected.WriteLine ("                               1 2 3 4 5 and more until the end.");
                        expected.WriteLine ("      --long-desc5           Lots of spaces in the middle - . - . - . - . - . -");
                        expected.WriteLine ("                                . - . - and more until the end.");
+                       expected.WriteLine ("  -o, --out=DIRECTORY        The DIRECTORY to place the generated files and");
+                       expected.WriteLine ("                               directories.");
+                       expected.WriteLine ("                               ");
+                       expected.WriteLine ("                               If not specified, defaults to");
+                       expected.WriteLine ("                               `dirname FILE`/cache/`basename FILE .tree`.");
                        expected.WriteLine ("  -h, -?, --help             show help text");
                        expected.WriteLine ("      --version              output version information and exit");