summaryrefslogtreecommitdiff
path: root/test/util
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-03-21 13:09:02 +0000
committerw0rp <devw0rp@gmail.com>2017-03-21 13:09:02 +0000
commit2d1d6fb85011e07a6b5b29f57247254cbc4b8815 (patch)
tree7e789a6745525a7da99848424be7da3bd883293d /test/util
parent6550cdfbd0d8e4037e9097db5a0caa6284b35708 (diff)
downloadale-2d1d6fb85011e07a6b5b29f57247254cbc4b8815.zip
Add some utility functions for changing directories for commands
Diffstat (limited to 'test/util')
-rw-r--r--test/util/test_cd_string_commands.vader9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/util/test_cd_string_commands.vader b/test/util/test_cd_string_commands.vader
new file mode 100644
index 00000000..0fdc0e30
--- /dev/null
+++ b/test/util/test_cd_string_commands.vader
@@ -0,0 +1,9 @@
+Before:
+ silent! cd /testplugin/test/util
+
+Execute(CdString should output the correct command string):
+ AssertEqual 'cd /foo\ bar/baz && ', ale#util#CdString('/foo bar/baz')
+
+Execute(BufferCdString should output the correct command string):
+ Assert match(ale#util#BufferCdString(bufnr('')), '^cd .*test/util && $') >= 0,
+ \ 'String didn''t match regex: ' . ale#util#BufferCdString(bufnr(''))