summaryrefslogtreecommitdiff
path: root/test/test_sml_command.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-09-10 00:20:05 +0100
committerw0rp <devw0rp@gmail.com>2017-09-10 00:20:05 +0100
commitc11d2ae375399ea935e3c2e36e812e8a727ffd99 (patch)
tree965088380bf815db8e8894613f3f5c6a35b5ea73 /test/test_sml_command.vader
parent1a52a2b8804c0aa8e3c061225ccba47a23d3999e (diff)
downloadale-c11d2ae375399ea935e3c2e36e812e8a727ffd99.zip
Fix an SML variable init bug, and get the SML cm file tests to pass on Windows
Diffstat (limited to 'test/test_sml_command.vader')
-rw-r--r--test/test_sml_command.vader14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/test_sml_command.vader b/test/test_sml_command.vader
index 5ce8a313..2db2552c 100644
--- a/test/test_sml_command.vader
+++ b/test/test_sml_command.vader
@@ -1,31 +1,29 @@
Before:
- runtime ale_linters/sml/sml.vim
- runtime ale_linters/sml/smlnj.vim
call ale#test#SetDirectory('/testplugin/test')
After:
call ale#test#RestoreDirectory()
call ale#linter#Reset()
-# ----- GetCmFile -----
-
Execute(smlnj finds CM file if it exists):
call ale#test#SetFilename('smlnj/cm/foo.sml')
- AssertEqual '/testplugin/test/smlnj/cm/sources.cm', ale#handlers#sml#GetCmFile(bufnr('%'))
+ AssertEqual
+ \ ale#path#Winify(g:dir . '/smlnj/cm/sources.cm'),
+ \ ale#handlers#sml#GetCmFile(bufnr('%'))
Execute(smlnj finds CM file by searching upwards):
call ale#test#SetFilename('smlnj/cm/path/to/bar.sml')
- AssertEqual '/testplugin/test/smlnj/cm/sources.cm', ale#handlers#sml#GetCmFile(bufnr('%'))
+ AssertEqual
+ \ ale#path#Winify(g:dir . '/smlnj/cm/sources.cm'),
+ \ ale#handlers#sml#GetCmFile(bufnr('%'))
Execute(smlnj returns '' when no CM file found):
call ale#test#SetFilename('smlnj/file/qux.sml')
AssertEqual '', ale#handlers#sml#GetCmFile(bufnr('%'))
-# ----- GetExecutableSmlnjCm & GetExecutableSmlnjFile -----
-
Execute(CM-project mode enabled when CM file found):
call ale#test#SetFilename('smlnj/cm/foo.sml')