Skip to content

Commit

Permalink
patch 8.0.0359: 'number' and 'relativenumber' are not properly tested
Browse files Browse the repository at this point in the history
Problem:    'number' and 'relativenumber' are not properly tested.
Solution:   Add tests, change old style to new style tests. (Ozaki Kiichi,
            closes #1447)
  • Loading branch information
brammool committed Feb 23, 2017
1 parent 60629d6 commit dc9a081
Show file tree
Hide file tree
Showing 9 changed files with 288 additions and 103 deletions.
4 changes: 3 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ test1 \
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
test60 test64 test65 test66 test67 test68 test69 \
test70 test72 test73 test74 test75 test77 test78 test79 \
test80 test82 test83 test84 test85 test86 test87 test88 test89 \
test80 test82 test83 test84 test85 test86 test87 test88 \
test90 test91 test94 test95 test97 test98 test99 \
test100 test101 test103 test104 test107 test108:
cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
Expand Down Expand Up @@ -2122,6 +2122,7 @@ test_arglist \
test_fileformat \
test_filter_cmd \
test_filter_map \
test_findfile \
test_float_func \
test_fnameescape \
test_fnamemodify \
Expand Down Expand Up @@ -2164,6 +2165,7 @@ test_arglist \
test_nested_function \
test_netbeans \
test_normal \
test_number \
test_options \
test_packadd \
test_partial \
Expand Down
4 changes: 2 additions & 2 deletions src/testdir/Make_all.mak
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ SCRIPTS_MORE4 = \
test59.out \
test72.out \
test78.out \
test83.out \
test89.out
test83.out


# Tests specifically for MS-Windows.
Expand Down Expand Up @@ -174,6 +173,7 @@ NEW_TESTS = test_arglist.res \
test_nested_function.res \
test_netbeans.res \
test_normal.res \
test_number.res \
test_packadd.res \
test_paste.res \
test_perl.res \
Expand Down
2 changes: 1 addition & 1 deletion src/testdir/Make_vms.mms
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ SCRIPT = test1.out test3.out test4.out test5.out \
test66.out test67.out test68.out test69.out \
test72.out test75.out \
test77a.out test78.out test79.out test80.out \
test82.out test84.out test88.out test89.out \
test82.out test84.out test88.out \
test90.out test91.out test94.out \
test95.out test98.out test99.out \
test103.out test104.out \
Expand Down
71 changes: 0 additions & 71 deletions src/testdir/test89.in

This file was deleted.

28 changes: 0 additions & 28 deletions src/testdir/test89.ok

This file was deleted.

1 change: 1 addition & 0 deletions src/testdir/test_alot.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ source test_file_perm.vim
source test_fileformat.vim
source test_filter_cmd.vim
source test_filter_map.vim
source test_findfile.vim
source test_float_func.vim
source test_fnamemodify.vim
source test_functions.vim
Expand Down
25 changes: 25 additions & 0 deletions src/testdir/test_findfile.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
" Test for findfile()
"
func Test_findfile()
new
let cwd=getcwd()
cd ..

" Tests may be run from a shadow directory, so an extra cd needs to be done to
" get above src/
if fnamemodify(getcwd(), ':t') != 'src'
cd ../..
else
cd ..
endif
set ssl

call assert_equal('src/testdir/test_findfile.vim', findfile('test_findfile.vim','src/test*'))
exe "cd" cwd
cd ..
call assert_equal('testdir/test_findfile.vim', findfile('test_findfile.vim','test*'))
call assert_equal('testdir/test_findfile.vim', findfile('test_findfile.vim','testdir'))

exe "cd" cwd
q!
endfunc
Loading

0 comments on commit dc9a081

Please sign in to comment.