You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/shelltest.hs
+28-13Lines changed: 28 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ import Import
28
28
importUtils
29
29
importTypes
30
30
importParse
31
+
importPrint
31
32
importPreprocessor
32
33
33
34
@@ -66,6 +67,8 @@ data Args = Args {
66
67
,debug::Bool
67
68
,debug_parse::Bool
68
69
,testpaths:: [FilePath]
70
+
,print_::MaybeString
71
+
,actual::MaybeString
69
72
}deriving (Show, Data, Typeable)
70
73
71
74
argdefs =Args {
@@ -88,6 +91,8 @@ argdefs = Args {
88
91
,debug = def &= help "Show debug info while running"
89
92
,debug_parse = def &= help "Show test file parsing results and stop"
90
93
,testpaths = def &= args &= typ "TESTFILES|TESTDIRS"
94
+
,print_ = def &= typ "FORMAT"&= opt "v3"&= groupname "Print test file"&= help "Print test files in specified format (default: v3)."
95
+
,actual = def &= typ "MODE"&= opt "all"&= help "Combined with --print, print test files with actual results (stdout, stderr, exit status). Mode 'all' prints all actual results (default). Mode 'update' prints actual results only for non-matching results, i.e. regular expressions in tests are retained."
91
96
}
92
97
&= helpArg [explicit, name "help", name "h"]
93
98
&= program progname
@@ -132,33 +137,41 @@ main = do
132
137
when (debug args) $ printf "processing %d test files: %s\n" (length testfiles) (intercalate ", " testfiles)
0 commit comments