aboutsummaryrefslogtreecommitdiff
path: root/lockfiles_test.lua
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-05-03 09:13:00 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2024-05-03 09:13:00 +0200
commit064717fcc800d9ca94366745610305d12a5532a4 (patch)
tree538e14ed2bccd4d176c163a22f709def397df9a1 /lockfiles_test.lua
parent6bce026b0c664ba9686a37e614330cb84be3a5e6 (diff)
downloadvis-lockfiles-064717fcc800d9ca94366745610305d12a5532a4.tar.gz
vis-lockfiles-064717fcc800d9ca94366745610305d12a5532a4.zip
split lock file functions into separate file to enable testing
Diffstat (limited to 'lockfiles_test.lua')
-rwxr-xr-xlockfiles_test.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/lockfiles_test.lua b/lockfiles_test.lua
new file mode 100755
index 0000000..a393f60
--- /dev/null
+++ b/lockfiles_test.lua
@@ -0,0 +1,12 @@
+#!/usr/bin/env lua5.4
+
+local lockfiles = dofile('lockfiles.lua')
+
+local lunatest = require('lunatest')
+function test_percentage_escape() -- luacheck: ignore 111
+ local lock_file_path_with_percent = lockfiles.lock_file_path('.', 'foo%bar')
+ local lock_file_path_with_slash = lockfiles.lock_file_path('.', 'foo/bar')
+ lunatest.assert_not_equal(lock_file_path_with_percent, lock_file_path_with_slash)
+end
+
+lunatest.run()