You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it("entering no name silently ends debugprint operation", function()
406
406
init_file({
407
407
"foo",
408
408
"bar",
409
409
}, "lua", 1, 0)
410
410
411
411
feedkeys("g?v<BS><BS><BS><CR>")
412
-
assert.are.same("No variable name entered.", notify_message)
413
412
414
413
check_lines({
415
414
"foo",
@@ -462,17 +461,42 @@ describe("can do various file types", function()
462
461
}, "foo", 1, 0, { filetype="foo" })
463
462
464
463
feedkeys("g?p")
465
-
assert.are.same(
466
-
"Don't have debugprint configuration for filetype foo",
467
-
notify_message
468
-
)
469
464
470
-
check_lines({
471
-
"foo",
472
-
"bar",
473
-
})
465
+
ifvim.fn.has("nvim-0.9.0") ==1then
466
+
check_lines({
467
+
"foo",
468
+
"Don't have debugprint configuration for filetype foo; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes",
469
+
"bar",
470
+
})
471
+
else
472
+
check_lines({
473
+
"foo",
474
+
"/*Don't have debugprint configuration for filetype foo; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes*/",
475
+
"bar",
476
+
})
477
+
end
474
478
end)
475
479
480
+
it(
481
+
"can gracefully handle known filetypes we don't have a config for: fennel",
482
+
function()
483
+
init_file({
484
+
"(fn print-and-add [a b c]",
485
+
" (print a)",
486
+
" (+ b c))",
487
+
}, "fnl", 1, 0)
488
+
489
+
feedkeys("g?p")
490
+
491
+
check_lines({
492
+
"(fn print-and-add [a b c]",
493
+
" ;Don't have debugprint configuration for filetype fennel; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes",
494
+
" (print a)",
495
+
" (+ b c))",
496
+
})
497
+
end
498
+
)
499
+
476
500
it("don't prompt for a variable name with an unknown filetype", function()
477
501
init_file({
478
502
"foo",
@@ -481,15 +505,20 @@ describe("can do various file types", function()
481
505
482
506
feedkeys("g?v")
483
507
feedkeys("<CR>")
484
-
assert.are.same(
485
-
"Don't have debugprint configuration for filetype foo",
486
-
notify_message
487
-
)
488
508
489
-
check_lines({
490
-
"foo",
491
-
"bar",
492
-
})
509
+
ifvim.fn.has("nvim-0.9.0") ==1then
510
+
check_lines({
511
+
"foo",
512
+
"Don't have debugprint configuration for filetype foo; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes",
513
+
"bar",
514
+
})
515
+
else
516
+
check_lines({
517
+
"foo",
518
+
"/*Don't have debugprint configuration for filetype foo; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes*/",
0 commit comments