On Sat, Jul 4, 2015 at 9:23 PM, Bram Moolenaar <[email protected]> wrote:
>
> When running the tests the terminal produces beeps.
> Usually this is caused by the test script having a line break,
> which is the command to move to the next line.
> If there is no next line Vim beeps.
>
> It would be nice if someone can spend time on locating the places
> where beeps are produced and fix them.  Usually inserting an Ex
> command helps:  :"

I've done the easy part - locating which *.in files those beeps are
coming from. I
made vim print to stderr the string "BELL" whenever it does an
out_char(BELL), and
I modified testdir/Makefile to log the name of the test script that it
currently runs
(patch at end of this mail). I then post-process those two output.
Here are the results.
The number on the left is the count of BELL character sent out when
running the test
on the right:

13      test17.in
10      test95.in
10      test94.in
7       test_erasebackword.in
6       test83.in
5       test_mapping.in
5       test_close_count.in
4       test61.in
4       test29.in
3       test_increment.in
2       test_listlbr_utf8.in
2       test_listlbr.in
2       test47.in
1       test_textobjects.in
1       test_autoformat_join.in
1       test90.in
1       test82.in
1       test78.in
1       test77.in
1       test62.in
1       test4.in
1       test45.in
1       test32.in
1       test30.in
1       test103.in

I ran the test on Ubuntu 14.04, with vim changeset 6900:bfc3682510d6.

I'll leave the fixing part to someone else :)

nazri.

diff -r bfc3682510d6 src/misc1.c
--- a/src/misc1.c       Sat Jul 04 15:05:14 2015 +0200
+++ b/src/misc1.c       Sun Jul 05 09:27:56 2015 +0800
@@ -3737,6 +3737,8 @@
            else
                ++beep_count;
 #else
+           fprintf(stderr, "BELL\n");
+           fflush(stderr);
            out_char(BELL);
 #endif
        }
diff -r bfc3682510d6 src/testdir/Makefile
--- a/src/testdir/Makefile      Sat Jul 04 15:05:14 2015 +0200
+++ b/src/testdir/Makefile      Sun Jul 05 09:27:56 2015 +0800
@@ -109,7 +109,8 @@
        # 200 msec is sufficient, but only modern sleep supports a fraction of
        # a second, fall back to a second if it fails.
        @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
-       -$(RUN_VIM) $*.in
+       @echo "Running test script $*.in" >>$$HOME/vimtestlog.txt
+       -$(RUN_VIM) 2>>$$HOME/vimtestlog.txt $*.in

        # For flaky tests retry one time.
        @/bin/sh -c "if test -f test.out -a $* = test61; then \

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui