Skip to content

Commit accbdd3

Browse files
disruptedsudo-tee
authored andcommitted
test: improve assertion to compare complete escaped pattern
1 parent 119531f commit accbdd3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/unit/permission_window_spec.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ describe('permission_window', function()
3434
assert.are.equal(1, #captured_opts.content)
3535

3636
local rendered_title = captured_opts.content[1]
37-
assert.is_true(rendered_title:find('\\n', 1, true) ~= nil)
37+
local expected_pattern = "python3 - <<'PY'\\nprint('hello')\\nPY"
38+
assert.is_true(rendered_title:find('`' .. expected_pattern .. '`', 1, true) ~= nil)
3839
assert.is_nil(rendered_title:find('\n', 1, true))
3940
end)
4041
end)

0 commit comments

Comments
 (0)