On Di, 19 Aug 2014, Bram Moolenaar wrote:

> Thanks.  Somehow for me appending _bug means you test for the bug to be
> present :-).  We can just call it test_linebreak.  Oh, and keep them in
> alphabetical order.  I started doing that recently.

Okay, how about that one (I added a small README.txt for the test 
directory, that contains your remarks).

Best,
Christian
-- 

-- 
-- 
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.
diff --git a/src/charset.c b/src/charset.c
--- a/src/charset.c
+++ b/src/charset.c
@@ -1195,10 +1195,7 @@ win_lbr_chartabsize(wp, line, s, col, he
 	    if (wp->w_p_bri)
 		added += get_breakindent_win(wp, line);
 
-	    if (tab_corr)
-		size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts;
-	    else
-		size += added;
+	    size += added;
 	    if (col != 0)
 		added = 0;
 	}
diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak
--- a/src/testdir/Make_amiga.mak
+++ b/src/testdir/Make_amiga.mak
@@ -39,6 +39,7 @@ SCRIPTS = test1.out test3.out test4.out 
 		test_autoformat_join.out \
 		test_breakindent.out \
 		test_changelist.out \
+		test_correct_linebreak.out \
 		test_eval.out \
 		test_insertcount.out \
 		test_listlbr.out \
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -38,6 +38,7 @@ SCRIPTS =	test3.out test4.out test5.out 
 		test_autoformat_join.out \
 		test_breakindent.out \
 		test_changelist.out \
+		test_correct_linebreak.out \
 		test_eval.out \
 		test_insertcount.out \
 		test_listlbr.out \
diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -58,6 +58,7 @@ SCRIPTS =	test3.out test4.out test5.out 
 		test_autoformat_join.out \
 		test_breakindent.out \
 		test_changelist.out \
+		test_correct_linebreak.out \
 		test_eval.out \
 		test_insertcount.out \
 		test_listlbr.out \
diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak
--- a/src/testdir/Make_os2.mak
+++ b/src/testdir/Make_os2.mak
@@ -40,6 +40,7 @@ SCRIPTS = test1.out test3.out test4.out 
 		test_autoformat_join.out \
 		test_breakindent.out \
 		test_changelist.out \
+		test_correct_linebreak.out \
 		test_eval.out \
 		test_insertcount.out \
 		test_listlbr.out \
diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -99,6 +99,7 @@ SCRIPT = test1.out  test2.out  test3.out
 	 test_autoformat_join.out \
 	 test_breakindent.out \
 	 test_changelist.out \
+	 test_correct_linebreak.out \
 	 test_eval.out \
 	 test_insertcount.out \
 	 test_listlbr.out \
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -36,6 +36,7 @@ SCRIPTS = test1.out test2.out test3.out 
 		test_autoformat_join.out \
 		test_breakindent.out \
 		test_changelist.out \
+		test_correct_linebreak.out \
 		test_eval.out \
 		test_insertcount.out \
 		test_listlbr.out \
diff --git a/src/testdir/README.txt b/src/testdir/README.txt
new file mode 100644
--- /dev/null
+++ b/src/testdir/README.txt
@@ -0,0 +1,8 @@
+This directory contains tests for various Vim features.
+
+If possible, try to add new tests to already existing files.
+
+To add new tests:
+1) Create test_<subject>.in and test_<subject>.ok files
+2) add them to all Makefiles (Make*) in alphabetical order
+3) use make test_<subject>.out to run a single test file
diff --git a/src/testdir/test_correct_linebreak.in b/src/testdir/test_correct_linebreak.in
new file mode 100644
--- /dev/null
+++ b/src/testdir/test_correct_linebreak.in
@@ -0,0 +1,22 @@
+Test for breakindent
+
+" Test, that the string "    a\tb\tc\td\te" is correctly
+" displayed in a 20 column wide window (see bug report
+" https://groups.google.com/d/msg/vim_dev/ZOdg2mc9c9Y/TT8EhFjEy0IJ
+
+STARTTEST
+:so small.vim
+:if !exists("+breakindent") | e! test.ok | w! test.out | qa! | endif
+:20vsp
+:set breakindent
+:/^\s*a
+fbgjyl
+:$put =@0
+:?^\s*z
+fygjyl
+:$put =@0
+:w! test.out
+:qa!
+ENDTEST
+    a	b	c	d	e
+    z   y       x       w       v
diff --git a/src/testdir/test_correct_linebreak.ok b/src/testdir/test_correct_linebreak.ok
new file mode 100644
--- /dev/null
+++ b/src/testdir/test_correct_linebreak.ok
@@ -0,0 +1,24 @@
+Test for breakindent
+
+" Test, that the string "    a\tb\tc\td\te" is correctly
+" displayed in a 20 column wide window (see bug report
+" https://groups.google.com/d/msg/vim_dev/ZOdg2mc9c9Y/TT8EhFjEy0IJ
+
+STARTTEST
+:so small.vim
+:if !exists("+breakindent") | e! test.ok | w! test.out | qa! | endif
+:20vsp
+:set breakindent
+:/^\s*a
+fbgjyl
+:$put =@0
+:?^\s*z
+fygjyl
+:$put =@0
+:w! test.out
+:qa!
+ENDTEST
+    a	b	c	d	e
+    z   y       x       w       v
+d
+w

Raspunde prin e-mail lui