Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
6b918b14
Commit
6b918b14
authored
Aug 17, 2008
by
Ian Lynagh
Browse files
Simplify the driver a bit: Break skip_{if,unless}_tag down into smaller parts
parent
163365fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/driver/testlib.py
View file @
6b918b14
...
...
@@ -286,19 +286,17 @@ def _namebase( opts, nb ):
# ---
def
skip_if_tag
(
tag
):
return
lambda
opts
,
t
=
tag
:
_skip_if_tag
(
opts
,
t
)
def
_skip_if_tag
(
opts
,
tag
):
def
if_tag
(
tag
,
f
):
if
tag
in
config
.
compiler_tags
:
opts
.
skip
=
1
def
skip_unless_tag
(
tag
):
return
lambda
opts
,
t
=
tag
:
_skip_unless_tag
(
opts
,
t
)
return
f
else
:
return
normal
def
_skip_
unless_tag
(
opts
,
tag
):
def
unless_tag
(
tag
,
f
):
if
not
(
tag
in
config
.
compiler_tags
):
opts
.
skip
=
1
return
f
else
:
return
normal
# ---
def
alone
(
opts
):
...
...
testsuite/tests/ghc-regress/esc/all.T
View file @
6b918b14
esc
=
skip_
unless_tag
('
esc
')
esc
=
unless_tag
('
esc
'
,
skip
)
test
('
TestList
',
esc
,
compile
,
['
-fesc
'])
test
('
TestImport
',
esc
,
compile
,
['
-fesc
'])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment