Hi,

The attached patch converts the test_marks test from old style to new style.

- Yegappan

-- 
-- 
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/testdir/Make_all.mak b/src/testdir/Make_all.mak
index c8d23ea..9f26e3b 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -97,7 +97,6 @@ SCRIPTS_ALL = \
        test_insertcount.out \
        test_listchars.out \
        test_listlbr.out \
-       test_marks.out \
        test_nested_function.out \
        test_search_mbyte.out \
        test_utf8.out \
@@ -175,6 +174,7 @@ NEW_TESTS = test_arglist.res \
            test_json.res \
            test_langmap.res \
            test_man.res \
+           test_marks.res \
            test_matchadd_conceal.res \
            test_netbeans.res \
            test_packadd.res \
diff --git a/src/testdir/test_marks.in b/src/testdir/test_marks.in
deleted file mode 100644
index 23c2fb6..0000000
--- a/src/testdir/test_marks.in
+++ /dev/null
@@ -1,34 +0,0 @@
-Tests for marks.
-
-STARTTEST
-:so small.vim
-:" test that a deleted mark is restored after delete-undo-redo-undo
-:/^\t/+1
-:set nocp viminfo+=nviminfo
-madduu
-:let a = string(getpos("'a"))
-:$put ='Mark after delete-undo-redo-undo: '.a
-:''
-ENDTEST
-
-       textline A
-       textline B
-       textline C
-
-STARTTEST
-:" test that CTRL-A and CTRL-X updates last changed mark '[, '].
-:/^123/
-:execute "normal! \<C-A>`[v`]rAjwvjw\<C-X>`[v`]rX"
-ENDTEST
-
-CTRL-A CTRL-X:
-123 123 123
-123 123 123
-123 123 123
-
-STARTTEST
-:g/^STARTTEST/.,/^ENDTEST/d
-:wq! test.out
-ENDTEST
-
-Results:
diff --git a/src/testdir/test_marks.ok b/src/testdir/test_marks.ok
deleted file mode 100644
index e6c02ee..0000000
--- a/src/testdir/test_marks.ok
+++ /dev/null
@@ -1,16 +0,0 @@
-Tests for marks.
-
-
-       textline A
-       textline B
-       textline C
-
-
-CTRL-A CTRL-X:
-AAA 123 123
-123 XXXXXXX
-XXX 123 123
-
-
-Results:
-Mark after delete-undo-redo-undo: [0, 15, 2, 0]
diff --git a/src/testdir/test_marks.vim b/src/testdir/test_marks.vim
new file mode 100644
index 0000000..d00b1dd
--- /dev/null
+++ b/src/testdir/test_marks.vim
@@ -0,0 +1,26 @@
+
+" Test that a deleted mark is restored after delete-undo-redo-undo.
+function! Test_Restore_DelMark()
+  enew!
+  call append(0, ["    textline A", "  textline B", "  textline C"])
+  normal! 2gg
+  set nocp viminfo+=nviminfo
+  exe "normal! i\<C-G>u\<Esc>"
+  exe "normal! maddu\<C-R>u"
+  let pos = getpos("'a")
+  call assert_equal(2, pos[1])
+  call assert_equal(1, pos[2])
+  enew!
+endfunction
+
+" Test that CTRL-A and CTRL-X updates last changed mark '[, '].
+function! Test_Incr_Marks()
+  enew!
+  call append(0, ["123 123 123", "123 123 123", "123 123 123"])
+  normal! gg
+  execute "normal! \<C-A>`[v`]rAjwvjw\<C-X>`[v`]rX"
+  call assert_equal("AAA 123 123", getline(1))
+  call assert_equal("123 XXXXXXX", getline(2))
+  call assert_equal("XXX 123 123", getline(3))
+  enew!
+endfunction

Raspunde prin e-mail lui