annotate src/testdir/test_fixeol.in @ 7870:fb5ba6fbc843 v7.4.1232

commit https://github.com/vim/vim/commit/1357caf31f3e447d99baf8dd6a3243e2ab38567f Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 1 21:40:14 2016 +0100 patch 7.4.1232 Problem: Compiler warnings when the Sniff feature is enabled. Solution: Add UNUSED.
author Christian Brabandt <cb@256bit.org>
date Mon, 01 Feb 2016 21:45:06 +0100
parents 62ba356c2d4e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6933
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Tests for 'fixeol' vim: set ft=vim :
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :" first write two test files – with and without trailing EOL
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 :" use Unix fileformat for consistency
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :set ff=unix
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :enew!
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 awith eol:w! XXEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 :enew!
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 :set noeol nofixeol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 awithout eol:w! XXNoEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 :set eol fixeol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :bwipe XXEol XXNoEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 :"
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 :" try editing files with 'fixeol' disabled
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 :e! XXEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 ostays eol:set nofixeol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 :w! XXTestEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :e! XXNoEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 ostays without:set nofixeol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :w! XXTestNoEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :bwipe XXEol XXNoEol XXTestEol XXTestNoEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :set fixeol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :"
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :" Append "END" to each file so that we can see what the last written char was.
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 ggdGaEND:w >>XXEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :w >>XXNoEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :w >>XXTestEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :w >>XXTestNoEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :"
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 :" Concatenate the results
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :e! test.out
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 a0:$r XXEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 :$r XXNoEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 Go1:$r XXTestEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :$r XXTestNoEol
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 :w
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 :qa!
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 ENDTEST
62ba356c2d4e patch 7.4.785
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40