11function ! s: build ()
2- return map ( ghcmod#build_command ([' do' ]), ' fnamemodify(v:val, ":.") ' )
2+ return ghcmod#build_command ([' do' ])
33endfunction
44
55let s: unit = tinytest#new ()
@@ -18,12 +18,12 @@ function! s:unit.test_build_with_dist_dir()
1818 call system (' cd test/data/with-cabal; cabal configure; cabal build' )
1919 edit test/data/ with- cabal/src/ Foo/Bar.hs
2020 call self .assert.equal ([' ghc-mod' ,
21- \ ' -g' , ' -i' , ' -g ' , ' test/data/with-cabal/dist/build/autogen' ,
22- \ ' -g' , ' -I' , ' -g ' , ' test/data/with-cabal/dist/build/autogen' ,
21+ \ ' -g' , ' -i' . fnamemodify ( ' test/data/with-cabal/dist/build/autogen' , ' :p:h ' ) ,
22+ \ ' -g' , ' -I' . fnamemodify ( ' test/data/with-cabal/dist/build/autogen' , ' :p:h ' ) ,
2323 \ ' -g' , ' -optP-include' ,
24- \ ' -g' , ' -optP' , ' -g ' , ' test/data/with-cabal/dist/build/autogen/cabal_macros.h' ,
25- \ ' -g' , ' -i' , ' -g ' , ' test/data/with-cabal/dist/build' ,
26- \ ' -g' , ' -I' , ' -g ' , ' test/data/with-cabal/dist/build' ,
24+ \ ' -g' , ' -optP' . fnamemodify ( ' test/data/with-cabal/dist/build/autogen/cabal_macros.h' , ' :p ' ) ,
25+ \ ' -g' , ' -i' . fnamemodify ( ' test/data/with-cabal/dist/build' , ' :p:h ' ) ,
26+ \ ' -g' , ' -I' . fnamemodify ( ' test/data/with-cabal/dist/build' , ' :p:h ' ) ,
2727 \ ' do' ], s: build ())
2828 finally
2929 call system (' cd test/data/with-cabal; rm -rf dist' )
0 commit comments