diff options
author | Thomas Wienecke <wienecke.t@gmail.com> | 2014-03-06 14:29:18 +0100 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-03-07 17:30:39 -0300 |
commit | ef03a8c52accf4180b48630cb66aef92d3c3ce78 (patch) | |
tree | 7dedda62643a3dcd8f37b33cc46ba472a6c21061 /test | |
parent | d5b223afe22b0809e4718749a3cdc40ceb5434dd (diff) | |
download | rneovim-ef03a8c52accf4180b48630cb66aef92d3c3ce78.tar.gz rneovim-ef03a8c52accf4180b48630cb66aef92d3c3ce78.tar.bz2 rneovim-ef03a8c52accf4180b48630cb66aef92d3c3ce78.zip |
Declare is_executable as static and remove its unit tests.
Testing the public interface mch_can_exe should suffice. Every former
test of is_executable has a counterpart in the tests of mch_can_exe.
Thus we can keep private things private.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/os_unix.moon | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/test/unit/os_unix.moon b/test/unit/os_unix.moon index 09505235d7..6e986de44f 100644 --- a/test/unit/os_unix.moon +++ b/test/unit/os_unix.moon @@ -55,26 +55,6 @@ describe 'os_unix function', -> it 'returns true if an arbitrary directory is given', -> eq TRUE, (mch_isdir 'unit-test-directory') - describe 'is_executable', -> - is_executable = (name) -> - name = cstr (string.len name), name - os.is_executable name - - it 'returns false when given a directory', -> - eq FALSE, (is_executable 'unit-test-directory') - - it 'returns false when the given file does not exists', -> - eq FALSE, (is_executable 'does-not-exist.file') - - it 'returns true when given an executable regular file', -> - eq TRUE, (is_executable absolute_executable) - - it 'returns false when given a regular file without executable bit set', -> - -- This is a critical test since Windows does not have any executable - -- bit. Thus is_executable returns TRUE on every regular file on - -- Windows and this test will fail. - eq FALSE, (is_executable 'unit-test-directory/test.file') - describe 'mch_can_exe', -> mch_can_exe = (name) -> name = cstr (string.len name), name @@ -83,6 +63,9 @@ describe 'os_unix function', -> it 'returns false when given a directory', -> eq FALSE, (mch_can_exe './unit-test-directory') + it 'returns false when given a regular file without executable bit set', -> + eq FALSE, (mch_can_exe 'unit-test-directory/test.file') + it 'returns false when the given file does not exists', -> eq FALSE, (mch_can_exe 'does-not-exist.file') |