Skip to content

Commit e76265a

Browse files
committed
Fix test case for ghcmod#build_command()
All paths should be absolute.
1 parent a227c85 commit e76265a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/test_build_command.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function! s:build()
2-
return map(ghcmod#build_command(['do']), 'fnamemodify(v:val, ":.")')
2+
return ghcmod#build_command(['do'])
33
endfunction
44

55
let 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

Comments
 (0)