Răsfoiți Sursa

FPCUnit: Add short form "-f" for "--file" option

n7800 4 ore în urmă
părinte
comite
b6f1441a32
1 a modificat fișierele cu 5 adăugiri și 4 ștergeri
  1. 5 4
      packages/fcl-fpcunit/src/consoletestrunner.pas

+ 5 - 4
packages/fcl-fpcunit/src/consoletestrunner.pas

@@ -126,7 +126,8 @@ const
     'y'+ // ArgStyleSheet
     'p'+ // ArgProgress
     'u'+ // ArgStatus
-    'x'; // ArgNoExitCode
+    'x'+ // ArgNoExitCode
+    'f'; // ArgFile
   DefaultLongOpts: array[1..14] of string = (
     ArgHelp,
     ArgList,
@@ -406,7 +407,7 @@ begin
     writeln('  -p or --',ArgProgress,'          Show progress');
     writeln('  -u or --',ArgStatus,'            Show status messages on stderr');
     writeln('  -x or --',ArgNoExitCode, '       Do not set exit code on errors');
-    writeln('  --',ArgFile,'=<filename>         Output results to file');
+    writeln('  -f or --',ArgFile,'=<filename>   Output results to file');
     writeln('  --',ArgNoConfig, '               Do not read the configuration file');
     WriteCustomHelp;
     writeln;
@@ -515,8 +516,8 @@ begin
     TAssert.StatusEvent:=@DoStatus;
   if HasOption('x',ArgNoExitCode) then
     NoExitCodeOnError:=True;
-  if HasOption(ArgFile) then
-    FileName:=GetOptionValue(ArgFile);
+  if HasOption('f',ArgFile) then
+    FileName:=GetOptionValue('f',ArgFile);
 end;
 
 procedure TTestRunner.ExtendXmlDocument(Doc: TXMLDocument);