~a-schlapsi/nunit-3.0/linux-makefile

« back to all changes in this revision

Viewing changes to src/framework/Runner/CommandLineOptions.cs

  • Committer: Andreas Schlapsi
  • Date: 2010-01-23 23:14:05 UTC
  • mfrom: (18.1.137 work)
  • Revision ID: a.schlapsi@gmx.at-20100123231405-17deqoh18nfnbq1j
Merged with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    public class CommandLineOptions
38
38
    {
39
39
        private string optionChars;
 
40
        private static string NL = NUnit.Env.NewLine;
40
41
 
41
42
        private bool wait = false;
42
43
        private bool nologo = false;
43
44
        private bool listprops = false;
44
45
        private bool help = false;
 
46
        private bool full = false;
45
47
 
46
48
        private bool error = false;
47
49
 
96
98
        }
97
99
 
98
100
        /// <summary>
 
101
        /// Gets a value indicating whether a full report should be displayed
 
102
        /// </summary>
 
103
        public bool Full
 
104
        {
 
105
            get { return full; }
 
106
        }
 
107
 
 
108
        /// <summary>
99
109
        /// Gets the test count
100
110
        /// </summary>
101
111
        public int TestCount
140
150
        /// </summary>
141
151
        public string[] Parameters
142
152
        {
 
153
#if CLR_2_0
143
154
            get { return (string[])parameters.ToArray(); }
 
155
#else
 
156
            get { return (string[])parameters.ToArray(typeof(string)); }
 
157
#endif
144
158
        }
145
159
 
146
160
        private void ProcessOption(string opt)
171
185
                case "test":
172
186
                    tests.Add(val);
173
187
                    break;
 
188
                case "full":
 
189
                    full = true;
 
190
                    break;
174
191
                default:
175
192
                    error = true;
176
193
                    invalidOptions.Add(opt);
202
219
            {
203
220
                StringBuilder sb = new StringBuilder();
204
221
                foreach (string opt in invalidOptions)
205
 
                    sb.Append( "Invalid option: " + opt + NUnit.Env.NewLine );
 
222
                    sb.Append( "Invalid option: " + opt + NL );
206
223
                return sb.ToString();
207
224
            }
208
225
        }
216
233
            get
217
234
            {
218
235
                StringBuilder sb = new StringBuilder();
219
 
                string NL = NUnit.Env.NewLine;
220
236
 
221
237
#if PocketPC || WindowsCE || NETCF
222
238
                string name = "NUnitLite";
236
252
                sb.Append("  -help           Displays this help" + NL + NL);
237
253
                sb.Append("  -nologo         Suppresses display of the initial message" + NL + NL);
238
254
                sb.Append("  -wait           Waits for a key press before exiting" + NL + NL);
 
255
                sb.Append("  -full           Prints full report of all test results." + NL + NL);
239
256
                if (System.IO.Path.DirectorySeparatorChar != '/')
240
257
                    sb.Append("On Windows, options may be prefixed by a '/' character if desired" + NL + NL);
241
258
                sb.Append("Options that take values may use an equal sign or a colon" + NL);