diff options
| author | William Boman <william@redwill.se> | 2022-07-08 18:34:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-08 18:34:38 +0200 |
| commit | 976aa4fbee8a070f362cab6f6ec84e9251a90cf9 (patch) | |
| tree | 5e8d9c9c59444a25c7801b8f39763c4ba6e1f76d /tests/mason-core/fs_spec.lua | |
| parent | feat: add gotests, gomodifytags, impl (#28) (diff) | |
| download | mason-976aa4fbee8a070f362cab6f6ec84e9251a90cf9.tar mason-976aa4fbee8a070f362cab6f6ec84e9251a90cf9.tar.gz mason-976aa4fbee8a070f362cab6f6ec84e9251a90cf9.tar.bz2 mason-976aa4fbee8a070f362cab6f6ec84e9251a90cf9.tar.lz mason-976aa4fbee8a070f362cab6f6ec84e9251a90cf9.tar.xz mason-976aa4fbee8a070f362cab6f6ec84e9251a90cf9.tar.zst mason-976aa4fbee8a070f362cab6f6ec84e9251a90cf9.zip | |
refactor: add mason-schemas and mason-core modules (#29)
* refactor: add mason-schemas and move generated filetype map to mason-lspconfig
* refactor: add mason-core module
Diffstat (limited to 'tests/mason-core/fs_spec.lua')
| -rw-r--r-- | tests/mason-core/fs_spec.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/mason-core/fs_spec.lua b/tests/mason-core/fs_spec.lua new file mode 100644 index 00000000..c3d5fea7 --- /dev/null +++ b/tests/mason-core/fs_spec.lua @@ -0,0 +1,24 @@ +local fs = require "mason-core.fs" +local mason = require "mason" + +describe("fs", function() + before_each(function() + mason.setup { + install_root_dir = "/foo", + } + end) + + it( + "refuses to rmrf paths outside of boundary", + async_test(function() + local e = assert.has.errors(function() + fs.async.rmrf "/thisisa/path" + end) + + assert.equal( + [[Refusing to rmrf "/thisisa/path" which is outside of the allowed boundary "/foo". Please report this error at https://github.com/williamboman/mason.nvim/issues/new]], + e + ) + end) + ) +end) |
