Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 19736:4174c4da6ff7 v8.2.0424
patch 8.2.0424: checking for wrong return value
Commit: https://github.com/vim/vim/commit/97acfc781bdb7fa2838dc6e0e7f9952ea61bb2fd
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 22 13:44:28 2020 +0100
patch 8.2.0424: checking for wrong return value
Problem: Checking for wrong return value. (Tom)
Solution: Invert the check and fix the test.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 22 Mar 2020 13:45:08 +0100 |
parents | fe8ba2f82f59 |
children | 99248f0ff29d |
comparison
equal
deleted
inserted
replaced
19735:d16efe1407c1 | 19736:4174c4da6ff7 |
---|---|
941 endwhile | 941 endwhile |
942 assert_equal('1_3_', result) | 942 assert_equal('1_3_', result) |
943 enddef | 943 enddef |
944 | 944 |
945 def Test_interrupt_loop() | 945 def Test_interrupt_loop() |
946 let caught = false | |
946 let x = 0 | 947 let x = 0 |
947 while 1 | 948 try |
948 x += 1 | 949 while 1 |
949 if x == 100 | 950 x += 1 |
950 feedkeys("\<C-C>", 'Lt') | 951 if x == 100 |
951 endif | 952 feedkeys("\<C-C>", 'Lt') |
952 endwhile | 953 endif |
954 endwhile | |
955 catch | |
956 caught = true | |
957 assert_equal(100, x) | |
958 endtry | |
959 assert_true(caught, 'should have caught an exception') | |
953 enddef | 960 enddef |
954 | 961 |
955 def Test_substitute_cmd() | 962 def Test_substitute_cmd() |
956 new | 963 new |
957 setline(1, 'something') | 964 setline(1, 'something') |