Commit Graph

8 Commits

Author SHA1 Message Date
Thomas Wienecke
1949acc806 Revive vim_fname (-> os_file_exists); fix misuse of mch_getperm.
* Move vim_fname from misc1 to os/fs:os_file_exists.
* Add unit tests for os_file_exists.
* Replace misuse of mch_getperm with os_file_exists.
2014-03-15 11:50:22 -03:00
Thomas Wienecke
1f578ec5a1 Add unit tests for mch_[gs]etperm.
Use preprocessor trick proposed by @mahkoh to import 'defines' like
S_IRUSR.
2014-03-15 11:50:22 -03:00
Thomas Wienecke
ab0c96187c Fix bugs, clean code, add tests.
* Add const specifiers, update comments, add assert.
* Move os_unix.moon tests to os/fs.moon + clean tests.
* Add uv_fs_req_cleanup call.
* Add tests with absolute paths to mch_isdir.
* Add to_cstr to test/unit/helpers.moon and fix respective unit tests.
2014-03-07 17:30:39 -03:00
Thomas Wienecke
fc86866402 Fix style issues.
* Rename mch_full_name to mch_get_absolute_path.
* Rename mch_is_full_name to mch_is_absolute_path.
* Add a lot of missing parentheses.
* Remove yoda-conditions for consistency.
* Remove spaces in function declaration.
2014-03-06 13:10:58 -03:00
Thiago de Arruda
34538a82f3 Apply small refactor to unit tests
Redefine macro constants as enums in the ffi and import those in their
respective test modules.
2014-03-04 11:26:37 -03:00
Thomas Wienecke
0677e0ee9c Correct a few parentheses. 2014-03-04 06:54:08 -03:00
Thomas Wienecke
92a0374d7b Rename and refactor mch_FullName.
* Rename mch_FullName to mch_full_name to match the style guide.
* Add mch_full_dir_name, which saves the absolute path of a given
directory relative to cwd into a given buffer.
* Add function append_path, which glues together two given paths with a
slash.
* Adapt moonscript coding style to the tests.
2014-03-04 06:54:08 -03:00
Thomas Wienecke
fcbfd57d1f Add unit tests for ported filesystem functions. 2014-03-03 08:54:02 -03:00