Skip to content

Commit

Permalink
Fix conflict match
Browse files Browse the repository at this point in the history
The match uses digits instead of alpha characters
  • Loading branch information
zschreur committed May 29, 2024
1 parent f3a109e commit c247e53
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lua/telescope-jj/conflicts.test.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
local s1 = "file two-sided conflict"
local s2 = "file two-sided conflict"
local s3 = "file two-sided conflict"
local s4 = "file three-sided conflict"
local s5 = "file two-sided conflict two-sided conflict"
local s1 = "file 2-sided conflict"
local s2 = "file 2-sided conflict"
local s3 = "file 2-sided conflict"
local s4 = "file 3-sided conflict"
local s5 = "file 2-sided conflict 2-sided conflict"

local pattern = "^(.-)%s+%a+%-sided conflict$"
local pattern = "^(.-)%s+%d+%-sided conflict$"
assert(string.match(s1, pattern) == "file")
assert(string.match(s2, pattern) == "file")
assert(string.match(s3, pattern) == "file")
assert(string.match(s4, pattern) == "file")
assert(string.match(s5, pattern) == "file two-sided conflict")
assert(string.match(s5, pattern) == "file 2-sided conflict")

0 comments on commit c247e53

Please sign in to comment.