@@ -490,19 +490,11 @@ describe("can do various file types", function()
490
490
491
491
feedkeys (" g?p" )
492
492
493
- if vim .fn .has (" nvim-0.9.0" ) == 1 then
494
- check_lines ({
495
- " foo" ,
496
- " No debugprint configuration for filetype foo; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes" ,
497
- " bar" ,
498
- })
499
- else
500
- check_lines ({
501
- " foo" ,
502
- " /*No debugprint configuration for filetype foo; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes*/" ,
503
- " bar" ,
504
- })
505
- end
493
+ check_lines ({
494
+ " foo" ,
495
+ " No debugprint configuration for filetype foo; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes" ,
496
+ " bar" ,
497
+ })
506
498
end )
507
499
508
500
it (
@@ -534,19 +526,11 @@ describe("can do various file types", function()
534
526
feedkeys (" g?v" )
535
527
feedkeys (" <CR>" )
536
528
537
- if vim .fn .has (" nvim-0.9.0" ) == 1 then
538
- check_lines ({
539
- " foo" ,
540
- " No debugprint configuration for filetype foo; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes" ,
541
- " bar" ,
542
- })
543
- else
544
- check_lines ({
545
- " foo" ,
546
- " /*No debugprint configuration for filetype foo; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes*/" ,
547
- " bar" ,
548
- })
549
- end
529
+ check_lines ({
530
+ " foo" ,
531
+ " No debugprint configuration for filetype foo; see https://github.com/andrewferrier/debugprint.nvim?tab=readme-ov-file#add-custom-filetypes" ,
532
+ " bar" ,
533
+ })
550
534
end )
551
535
end )
552
536
@@ -1718,110 +1702,105 @@ describe("check python indenting", function()
1718
1702
end )
1719
1703
end )
1720
1704
1721
- if vim .fn .has (" nvim-0.9.0" ) == 1 then
1722
- -- This test will not work on NeoVim <= 0.8, I think because markdown only
1723
- -- supports a limited range of embedded langs
1724
-
1725
- describe (" embedded treesitter langs" , function ()
1726
- before_each (function ()
1727
- debugprint .setup ({ ignore_treesitter = false })
1728
- end )
1705
+ describe (" embedded treesitter langs" , function ()
1706
+ before_each (function ()
1707
+ debugprint .setup ({ ignore_treesitter = false })
1708
+ end )
1729
1709
1730
- after_each (teardown )
1710
+ after_each (teardown )
1731
1711
1732
- it (" lua in markdown" , function ()
1733
- local filename = init_file ({
1734
- " foo" ,
1735
- " ```lua" ,
1736
- " x = 1" ,
1737
- " ```" ,
1738
- " bar" ,
1739
- }, " markdown" , 3 , 0 )
1712
+ it (" lua in markdown" , function ()
1713
+ local filename = init_file ({
1714
+ " foo" ,
1715
+ " ```lua" ,
1716
+ " x = 1" ,
1717
+ " ```" ,
1718
+ " bar" ,
1719
+ }, " markdown" , 3 , 0 )
1740
1720
1741
- feedkeys (" g?p" )
1721
+ feedkeys (" g?p" )
1742
1722
1743
- check_lines ({
1744
- " foo" ,
1745
- " ```lua" ,
1746
- " x = 1" ,
1747
- " print('DEBUGPRINT[1]: " .. filename .. " :3 (after x = 1)')" ,
1748
- " ```" ,
1749
- " bar" ,
1750
- })
1751
- end )
1723
+ check_lines ({
1724
+ " foo" ,
1725
+ " ```lua" ,
1726
+ " x = 1" ,
1727
+ " print('DEBUGPRINT[1]: " .. filename .. " :3 (after x = 1)')" ,
1728
+ " ```" ,
1729
+ " bar" ,
1730
+ })
1731
+ end )
1752
1732
1753
- it (" lua in markdown above" , function ()
1754
- local filename = init_file ({
1755
- " foo" ,
1756
- " ```lua" ,
1757
- " x = 1" ,
1758
- " ```" ,
1759
- " bar" ,
1760
- }, " markdown" , 3 , 0 )
1733
+ it (" lua in markdown above" , function ()
1734
+ local filename = init_file ({
1735
+ " foo" ,
1736
+ " ```lua" ,
1737
+ " x = 1" ,
1738
+ " ```" ,
1739
+ " bar" ,
1740
+ }, " markdown" , 3 , 0 )
1761
1741
1762
- feedkeys (" g?P" )
1742
+ feedkeys (" g?P" )
1763
1743
1764
- check_lines ({
1765
- " foo" ,
1766
- " ```lua" ,
1767
- " print('DEBUGPRINT[1]: " .. filename .. " :3 (before x = 1)')" ,
1768
- " x = 1" ,
1769
- " ```" ,
1770
- " bar" ,
1771
- })
1772
- end )
1744
+ check_lines ({
1745
+ " foo" ,
1746
+ " ```lua" ,
1747
+ " print('DEBUGPRINT[1]: " .. filename .. " :3 (before x = 1)')" ,
1748
+ " x = 1" ,
1749
+ " ```" ,
1750
+ " bar" ,
1751
+ })
1752
+ end )
1773
1753
1774
- it (" javascript in html" , function ()
1775
- local filename = init_file ({
1776
- " <html>" ,
1777
- " <body>" ,
1778
- " <script>" ,
1779
- " let x = 3;" ,
1780
- " " ,
1781
- " console.log(x);" ,
1782
- " </script>" ,
1783
- " </body>" ,
1784
- " </html>" ,
1785
- }, " html" , 6 , 0 )
1754
+ it (" javascript in html" , function ()
1755
+ local filename = init_file ({
1756
+ " <html>" ,
1757
+ " <body>" ,
1758
+ " <script>" ,
1759
+ " let x = 3;" ,
1760
+ " " ,
1761
+ " console.log(x);" ,
1762
+ " </script>" ,
1763
+ " </body>" ,
1764
+ " </html>" ,
1765
+ }, " html" , 6 , 0 )
1786
1766
1787
- feedkeys (" g?p" )
1767
+ feedkeys (" g?p" )
1788
1768
1789
- check_lines ({
1790
- " <html>" ,
1791
- " <body>" ,
1792
- " <script>" ,
1793
- " let x = 3;" ,
1794
- " " ,
1795
- " console.log(x);" ,
1796
- ' console.warn("DEBUGPRINT[1]: '
1797
- .. filename
1798
- .. ' :6 (after console.log(x);)")' ,
1799
- " </script>" ,
1800
- " </body>" ,
1801
- " </html>" ,
1802
- })
1803
- end )
1769
+ check_lines ({
1770
+ " <html>" ,
1771
+ " <body>" ,
1772
+ " <script>" ,
1773
+ " let x = 3;" ,
1774
+ " " ,
1775
+ " console.log(x);" ,
1776
+ ' console.warn("DEBUGPRINT[1]: '
1777
+ .. filename
1778
+ .. ' :6 (after console.log(x);)")' ,
1779
+ " </script>" ,
1780
+ " </body>" ,
1781
+ " </html>" ,
1782
+ })
1783
+ end )
1804
1784
1805
- it (" comment in lua" , function ()
1806
- local filename = init_file ({
1807
- " x = 3" ,
1808
- " -- abc" ,
1809
- " a = 2" ,
1810
- }, " lua" , 2 , 4 )
1785
+ it (" comment in lua" , function ()
1786
+ local filename = init_file ({
1787
+ " x = 3" ,
1788
+ " -- abc" ,
1789
+ " a = 2" ,
1790
+ }, " lua" , 2 , 4 )
1811
1791
1812
- feedkeys (" g?v<CR>" )
1792
+ feedkeys (" g?v<CR>" )
1813
1793
1814
- check_lines ({
1815
- " x = 3" ,
1816
- " -- abc" ,
1817
- " print('DEBUGPRINT[1]: "
1818
- .. filename
1819
- .. " :2: abc=' .. vim.inspect(abc))" ,
1820
- " a = 2" ,
1821
- })
1822
- end )
1794
+ check_lines ({
1795
+ " x = 3" ,
1796
+ " -- abc" ,
1797
+ " print('DEBUGPRINT[1]: "
1798
+ .. filename
1799
+ .. " :2: abc=' .. vim.inspect(abc))" ,
1800
+ " a = 2" ,
1801
+ })
1823
1802
end )
1824
- end
1803
+ end )
1825
1804
1826
1805
describe (" comment toggle" , function ()
1827
1806
after_each (teardown )
0 commit comments