fix test for these 2 cases

cabal configure --enable-tests
cabal build
cabal test

cabal install --enable-tests