Fix test eval-okay-autoargs

This commit is contained in:
John Wiegley 2018-04-15 02:22:33 -07:00
parent cce65fb106
commit 451ccf7c60
2 changed files with 4 additions and 2 deletions

View file

@ -95,7 +95,7 @@ evaluateExpression opts mpath evaluator handler expr = do
Success x -> x
Failure err -> errorWithoutStackTrace (show err)
eval' = (normalForm =<<) . eval Nothing (include opts)
eval' = (normalForm =<<) . eval mpath (include opts)
argmap args = embed $ Fix $ NVSet (M.fromList args) mempty

View file

@ -122,8 +122,10 @@ assertEval files = catch go $ \case
[".exp-disabled"] -> return ()
[".exp", ".flags"] -> do
flags <- Text.readFile (name ++ ".flags")
let flags' | Text.last flags == '\n' = Text.init flags
| otherwise = flags
case Opts.execParserPure Opts.defaultPrefs nixOptionsInfo
(fixup (map Text.unpack (Text.splitOn " " flags))) of
(fixup (map Text.unpack (Text.splitOn " " flags'))) of
Opts.Failure err -> errorWithoutStackTrace $
"Error parsing flags from " ++ name ++ ".flags: "
++ show err