aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/glob_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/eval/glob_spec.lua')
-rw-r--r--test/functional/eval/glob_spec.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/eval/glob_spec.lua b/test/functional/eval/glob_spec.lua
new file mode 100644
index 0000000000..977b82d733
--- /dev/null
+++ b/test/functional/eval/glob_spec.lua
@@ -0,0 +1,21 @@
+local helpers = require('test.functional.helpers')
+local clear, execute, eval, eq = helpers.clear, helpers.execute, helpers.eval, helpers.eq
+
+before_each(function()
+ clear()
+ lfs.mkdir('test-glob')
+ execute('cd test-glob')
+end)
+
+after_each(function()
+ lfs.rmdir('test-glob')
+end)
+
+describe('glob()', function()
+ it("glob('.*') returns . and .. ", function()
+ eq({'.', '..'}, eval("glob('.*', 0, 1)"))
+ end)
+ it("glob('*') returns an empty list ", function()
+ eq({}, eval("glob('*', 0, 1)"))
+ end)
+end)