@@ -1267,6 +1267,8 @@ describe("delete lines command", function()
1267
1267
after_each (teardown )
1268
1268
1269
1269
it (" basic" , function ()
1270
+ assert .equals (notify_message , nil )
1271
+
1270
1272
debugprint .setup ({})
1271
1273
1272
1274
init_file ({
@@ -1278,6 +1280,8 @@ describe("delete lines command", function()
1278
1280
feedkeys (" g?p" )
1279
1281
vim .cmd (" DeleteDebugPrints" )
1280
1282
1283
+ assert .equals (notify_message , " 1 debug line deleted." )
1284
+
1281
1285
check_lines ({
1282
1286
" function x()" ,
1283
1287
" local xyz = 3" ,
@@ -1286,6 +1290,8 @@ describe("delete lines command", function()
1286
1290
end )
1287
1291
1288
1292
it (" with custom command" , function ()
1293
+ assert .equals (notify_message , nil )
1294
+
1289
1295
debugprint .setup ({ commands = { delete_debug_prints = " FooBar" } })
1290
1296
1291
1297
init_file ({
@@ -1297,6 +1303,8 @@ describe("delete lines command", function()
1297
1303
feedkeys (" g?p" )
1298
1304
vim .cmd (" FooBar" )
1299
1305
1306
+ assert .equals (notify_message , " 1 debug line deleted." )
1307
+
1300
1308
check_lines ({
1301
1309
" function x()" ,
1302
1310
" local xyz = 3" ,
@@ -1307,6 +1315,8 @@ describe("delete lines command", function()
1307
1315
it (" complex" , function ()
1308
1316
debugprint .setup ({})
1309
1317
1318
+ assert .equals (notify_message , nil )
1319
+
1310
1320
init_file ({
1311
1321
" function x()" ,
1312
1322
" local xyz = 3" ,
@@ -1315,6 +1325,7 @@ describe("delete lines command", function()
1315
1325
1316
1326
feedkeys (" g?pg?vwibble<CR>g?p" )
1317
1327
vim .cmd (" DeleteDebugPrints" )
1328
+ assert .equals (notify_message , " 3 debug lines deleted." )
1318
1329
1319
1330
check_lines ({
1320
1331
" function x()" ,
@@ -1326,6 +1337,8 @@ describe("delete lines command", function()
1326
1337
it (" range - one line" , function ()
1327
1338
debugprint .setup ({})
1328
1339
1340
+ assert .equals (notify_message , nil )
1341
+
1329
1342
local filename = init_file ({
1330
1343
" function x()" ,
1331
1344
" local xyz = 3" ,
@@ -1335,6 +1348,7 @@ describe("delete lines command", function()
1335
1348
feedkeys (" g?pg?pg?pg?p" )
1336
1349
1337
1350
vim .cmd (" 2 DeleteDebugPrints" )
1351
+ assert .equals (notify_message , " 1 debug line deleted." )
1338
1352
1339
1353
check_lines ({
1340
1354
" function x()" ,
@@ -1355,6 +1369,8 @@ describe("delete lines command", function()
1355
1369
it (" range" , function ()
1356
1370
debugprint .setup ({})
1357
1371
1372
+ assert .equals (notify_message , nil )
1373
+
1358
1374
local filename = init_file ({
1359
1375
" function x()" ,
1360
1376
" local xyz = 3" ,
@@ -1364,6 +1380,7 @@ describe("delete lines command", function()
1364
1380
feedkeys (" g?pg?pg?pg?p" )
1365
1381
1366
1382
vim .cmd (" 2,3 DeleteDebugPrints" )
1383
+ assert .equals (notify_message , " 2 debug lines deleted." )
1367
1384
1368
1385
check_lines ({
1369
1386
" function x()" ,
@@ -1381,6 +1398,8 @@ describe("delete lines command", function()
1381
1398
it (" range at top" , function ()
1382
1399
debugprint .setup ({})
1383
1400
1401
+ assert .equals (notify_message , nil )
1402
+
1384
1403
local filename = init_file ({
1385
1404
" function x()" ,
1386
1405
" end" ,
@@ -1390,6 +1409,7 @@ describe("delete lines command", function()
1390
1409
feedkeys (" g?P" )
1391
1410
1392
1411
vim .cmd (" 1 DeleteDebugPrints" )
1412
+ assert .equals (notify_message , " 1 debug line deleted." )
1393
1413
1394
1414
check_lines ({
1395
1415
" function x()" ,
@@ -1403,6 +1423,8 @@ describe("delete lines command", function()
1403
1423
it (" range at bottom" , function ()
1404
1424
debugprint .setup ({})
1405
1425
1426
+ assert .equals (notify_message , nil )
1427
+
1406
1428
local filename = init_file ({
1407
1429
" function x()" ,
1408
1430
}, " lua" , 1 , 0 )
@@ -1411,6 +1433,7 @@ describe("delete lines command", function()
1411
1433
feedkeys (" g?P" )
1412
1434
1413
1435
vim .cmd (" $ DeleteDebugPrints" )
1436
+ assert .equals (notify_message , " 1 debug line deleted." )
1414
1437
1415
1438
check_lines ({
1416
1439
" print('DEBUGPRINT[2]: "
@@ -1423,6 +1446,8 @@ describe("delete lines command", function()
1423
1446
it (" with regexp print_tag" , function ()
1424
1447
debugprint .setup ({ print_tag = " \\ 033[33mDEBUG\\ 033[0m" })
1425
1448
1449
+ assert .equals (notify_message , nil )
1450
+
1426
1451
init_file ({
1427
1452
" function x()" ,
1428
1453
" local xyz = 3" ,
@@ -1431,6 +1456,7 @@ describe("delete lines command", function()
1431
1456
1432
1457
feedkeys (" g?p" )
1433
1458
vim .cmd (" DeleteDebugPrints" )
1459
+ assert .equals (notify_message , " 1 debug line deleted." )
1434
1460
1435
1461
check_lines ({
1436
1462
" function x()" ,
@@ -1444,6 +1470,8 @@ describe("delete lines command", function()
1444
1470
keymaps = { normal = { delete_debug_prints = " g?x" } },
1445
1471
})
1446
1472
1473
+ assert .equals (notify_message , nil )
1474
+
1447
1475
init_file ({
1448
1476
" function x()" ,
1449
1477
" local xyz = 3" ,
@@ -1452,6 +1480,7 @@ describe("delete lines command", function()
1452
1480
1453
1481
feedkeys (" g?p" )
1454
1482
feedkeys (" g?x" )
1483
+ assert .equals (notify_message , " 1 debug line deleted." )
1455
1484
1456
1485
check_lines ({
1457
1486
" function x()" ,
@@ -1686,6 +1715,7 @@ describe("comment toggle", function()
1686
1715
1687
1716
it (" basic" , function ()
1688
1717
debugprint .setup ({})
1718
+ assert .equals (notify_message , nil )
1689
1719
1690
1720
local filename = init_file ({
1691
1721
" function x()" ,
@@ -1696,6 +1726,7 @@ describe("comment toggle", function()
1696
1726
feedkeys (" g?p" )
1697
1727
vim .cmd (" ToggleCommentDebugPrint" )
1698
1728
feedkeys (" jjg?p" )
1729
+ assert .equals (notify_message , " 1 debug line comment-toggled." )
1699
1730
1700
1731
check_lines ({
1701
1732
" function x()" ,
@@ -1710,6 +1741,7 @@ describe("comment toggle", function()
1710
1741
})
1711
1742
1712
1743
vim .cmd (" ToggleCommentDebugPrint" )
1744
+ assert .equals (notify_message , " 2 debug lines comment-toggled." )
1713
1745
1714
1746
check_lines ({
1715
1747
" function x()" ,
@@ -1726,6 +1758,7 @@ describe("comment toggle", function()
1726
1758
1727
1759
it (" range" , function ()
1728
1760
debugprint .setup ({})
1761
+ assert .equals (notify_message , nil )
1729
1762
1730
1763
local filename = init_file ({
1731
1764
" function x()" ,
@@ -1737,6 +1770,7 @@ describe("comment toggle", function()
1737
1770
feedkeys (" jj" )
1738
1771
feedkeys (" g?p" )
1739
1772
vim .cmd (" 2 ToggleCommentDebugPrint" )
1773
+ assert .equals (notify_message , " 1 debug line comment-toggled." )
1740
1774
1741
1775
check_lines ({
1742
1776
" function x()" ,
@@ -1755,6 +1789,7 @@ describe("comment toggle", function()
1755
1789
debugprint .setup ({
1756
1790
keymaps = { normal = { toggle_comment_debug_prints = " g?x" } },
1757
1791
})
1792
+ assert .equals (notify_message , nil )
1758
1793
1759
1794
local filename = init_file ({
1760
1795
" function x()" ,
@@ -1766,6 +1801,7 @@ describe("comment toggle", function()
1766
1801
feedkeys (" g?xj" )
1767
1802
feedkeys (" j" )
1768
1803
feedkeys (" g?p" )
1804
+ assert .equals (notify_message , " 1 debug line comment-toggled." )
1769
1805
1770
1806
check_lines ({
1771
1807
" function x()" ,
0 commit comments