From 064717fcc800d9ca94366745610305d12a5532a4 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 3 May 2024 09:13:00 +0200 Subject: split lock file functions into separate file to enable testing --- lockfiles_test.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 lockfiles_test.lua (limited to 'lockfiles_test.lua') 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() -- cgit v1.2.3