Commit 810768d7 authored by simonmar's avatar simonmar
Browse files

[project @ 2001-08-16 12:00:00 by simonmar]

- Fix a bug in the 'defined' operator
- Print fewer newlines
parent bc8fc281
......@@ -223,8 +223,7 @@ processParsedTFile test_filter tfilepath initial_global_env topdefs
then return []
else
do { putStr "\n"
; officialMsg ("=== running tests in: " ++ tfilepath ++ " ===")
do { officialMsg ("=== running tests in: " ++ tfilepath ++ " ===")
; let macs = filter isTMacroDef topdefs
; let incls = filter isTInclude topdefs -- should be []
......@@ -242,7 +241,7 @@ processParsedTFile test_filter tfilepath initial_global_env topdefs
}}
where
doOne global_env macro_env (TTest tname stmts)
= do putStr "\n\n"
= do putStr "\n"
let test_id = TestID tfilepath tname
officialMsg ("=== " ++ ppTestID test_id ++ " ===")
r <- doOneTest (("testname", tname):global_env)
......@@ -552,8 +551,8 @@ evalExpr (EExists expr)
doesFileExistEV filename `thenEV` \ b ->
returnEV (fromBool b)
evalExpr (EDefined v)
| null v || head v /= '$'
= panic "evalExpr(EDefined): not a var"
| null v
= panic ("evalExpr(EDefined): not a var " ++ v)
-- This is a panic because the lexer+parser should have
-- conspired to ensure this
| otherwise
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment