Commit f64ae3a1 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add tests for OPTIONS pragmas applying to the wrong files

parent 18713b39
{-# OPTIONS_GHC -Wall -Werror #-}
module A_First where
module A_Main where
import A_First () -- Turns on -Wall -Werror
import A_Second () -- Is not -Wall clean
module A_Second where
-- Not -Wall clean: Missing signature:
a = 'c'
module B_First where
-- Not -Wall clean: Missing signature:
a = 'c'
module B_Main where
import B_First () -- Is not -Wall clean
import B_Second () -- Turns on -Wall -Werror
{-# OPTIONS_GHC -Wall -Werror #-}
module B_Second where
{-# OPTIONS_GHC -Wall -Werror #-}
module C_Child where
module C_Main where
import C_Child () -- Turns on -Wall -Werror
-- Not -Wall clean: Missing signature:
a = 'c'
module D_Child where
-- Not -Wall clean: Missing signature:
a = 'c'
{-# OPTIONS_GHC -Wall -Werror #-}
module D_Main where
import D_Child () -- Is not -Wall clean
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
module ManyFirst where
-- Not -Wall clean: Missing signature:
a = 'c'
{-# OPTIONS_GHC -Wall -Werror #-}
module ManySecond where
module ManyThird where
-- Not -Wall clean: Missing signature:
a = 'c'
test('dynamic_flags_002A', skip_if_fast, multimod_compile, ['A_Main', '-v0'])
test('dynamic_flags_002B', skip_if_fast, multimod_compile, ['B_Main', '-v0'])
test('dynamic_flags_002C', skip_if_fast, multimod_compile, ['C_Main', '-v0'])
test('dynamic_flags_002D', skip_if_fast, multimod_compile, ['D_Main', '-v0'])
test('dynamic_flags_002Many', skip_if_fast, multimod_compile, ['ManyFirst ManySecond ManyThird', '-v0'])
Markdown is supported
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