Update generated nvim config
This commit is contained in:
8
config/neovim/store/lazy-plugins/NrrwRgn/test/runtest.sh
Executable file
8
config/neovim/store/lazy-plugins/NrrwRgn/test/runtest.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/sh
|
||||
|
||||
for i in */; do
|
||||
cd "$i"
|
||||
./cmd.sh
|
||||
rm -f *.mod
|
||||
cd - > /dev/null
|
||||
done
|
||||
@ -0,0 +1 @@
|
||||
foobar 1.txt
|
||||
@ -0,0 +1 @@
|
||||
foobar 1.txt some more stuff
|
||||
@ -0,0 +1 @@
|
||||
foobar 2.txt
|
||||
@ -0,0 +1 @@
|
||||
foobar 2.txt some more stuff
|
||||
@ -0,0 +1 @@
|
||||
foobar 3.txt
|
||||
@ -0,0 +1 @@
|
||||
foobar 3.txt some more stuff
|
||||
23
config/neovim/store/lazy-plugins/NrrwRgn/test/test1/cmd.sh
Executable file
23
config/neovim/store/lazy-plugins/NrrwRgn/test/test1/cmd.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
|
||||
#set -x
|
||||
|
||||
dir="$(realpath ../..)"
|
||||
LC_ALL=C vim -u NONE -N \
|
||||
--cmd ':set noswapfile hidden' \
|
||||
--cmd 'argadd *.txt' \
|
||||
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||
-c 'sil :bufdo :NRP' \
|
||||
-c 'sil :NRM' \
|
||||
-c 'sil :g/^foobar.*/s//& some more stuff/' \
|
||||
-c 'sil :wq' \
|
||||
-c ':bufdo if bufname("")=~"^\\d\\.txt$"|saveas! %.mod|endif' \
|
||||
-c ':qa!'
|
||||
|
||||
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||
if [ "$?" -ne 0 ]; then
|
||||
printf "Test1 failed\n"
|
||||
printf "Diff:\n%s" "$rt"
|
||||
exit 2;
|
||||
else
|
||||
printf "Test1 successful!\n"
|
||||
fi
|
||||
@ -0,0 +1 @@
|
||||
## Test 1: Multi Narrowed Window for several distinct buffers ##
|
||||
@ -0,0 +1,4 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
@ -0,0 +1,6 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
Added Line
|
||||
Added after Narrowing Line
|
||||
24
config/neovim/store/lazy-plugins/NrrwRgn/test/test2/cmd.sh
Executable file
24
config/neovim/store/lazy-plugins/NrrwRgn/test/test2/cmd.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
|
||||
#set -x
|
||||
|
||||
Test="Test2"
|
||||
|
||||
dir="$(realpath ../..)"
|
||||
LC_ALL=C vim -u NONE -N \
|
||||
--cmd ':set noswapfile hidden' \
|
||||
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||
-c 'sil :1,$NR' \
|
||||
-c 'sil :$put =\"Added Line\"' \
|
||||
-c 'sil :wq' \
|
||||
-c 'sil :$put =\"Added after Narrowing Line\"' \
|
||||
-c ':bufdo if bufname("")=~"^\\d\\.txt$"|saveas! %.mod|endif' \
|
||||
-c ':qa!' 1.txt
|
||||
|
||||
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||
if [ "$?" -ne 0 ]; then
|
||||
printf "$Test failed\n"
|
||||
printf "Diff:\n%s" "$rt"
|
||||
exit 2;
|
||||
else
|
||||
printf "$Test successful!\n"
|
||||
fi
|
||||
@ -0,0 +1 @@
|
||||
## Test 2: Single Narrowed Window for a single buffers ##
|
||||
@ -0,0 +1,4 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
@ -0,0 +1,6 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
Added Line
|
||||
Added after Narrowing Line
|
||||
26
config/neovim/store/lazy-plugins/NrrwRgn/test/test3/cmd.sh
Executable file
26
config/neovim/store/lazy-plugins/NrrwRgn/test/test3/cmd.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
|
||||
#set -x
|
||||
|
||||
Test="Test3"
|
||||
|
||||
dir="$(realpath ../..)"
|
||||
LC_ALL=C vim -u NONE -N \
|
||||
--cmd ':set noswapfile hidden' \
|
||||
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||
-c 'sp description.md | noa wincmd p | :e 1.txt' \
|
||||
-c 'sil :1,$NR' \
|
||||
-c 'sil :$put =\"Added Line\"' \
|
||||
-c 'sil :wq' \
|
||||
-c '2wincmd w' \
|
||||
-c 'sil :$put =\"Added after Narrowing Line\"' \
|
||||
-c ':bufdo if bufname("")=~"^\\d\\.txt$"|saveas! %.mod|endif' \
|
||||
-c ':qa!'
|
||||
|
||||
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||
if [ "$?" -ne 0 ]; then
|
||||
printf "$Test failed\n"
|
||||
printf "Diff:\n%s" "$rt"
|
||||
exit 2;
|
||||
else
|
||||
printf "$Test successful!\n"
|
||||
fi
|
||||
@ -0,0 +1 @@
|
||||
## Test 2: Single Narrowed Window for a single buffer, but has another split window ##
|
||||
@ -0,0 +1,4 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
@ -0,0 +1,6 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
Added Line
|
||||
Added another Line
|
||||
26
config/neovim/store/lazy-plugins/NrrwRgn/test/test4/cmd.sh
Executable file
26
config/neovim/store/lazy-plugins/NrrwRgn/test/test4/cmd.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
|
||||
#set -x
|
||||
|
||||
Test="Test4"
|
||||
|
||||
dir="$(realpath ../..)"
|
||||
LC_ALL=C vim -u NONE -N \
|
||||
--cmd ':set noswapfile hidden' \
|
||||
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||
-c ':e 1.txt' \
|
||||
-c 'sil :1,$NR!' \
|
||||
-c 'sil :$put =\"Added Line\"' \
|
||||
-c ':w|b#' \
|
||||
-c ':saveas! 1.txt.mod' \
|
||||
-c '2b|w|b#|b#' \
|
||||
-c 'sil :$put =\"Added another Line\"' \
|
||||
-c ':w|b#|wq!'
|
||||
|
||||
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||
if [ "$?" -ne 0 ]; then
|
||||
printf "$Test failed\n"
|
||||
printf "Diff:\n%s\n" "$rt"
|
||||
exit 2;
|
||||
else
|
||||
printf "$Test successful!\n"
|
||||
fi
|
||||
@ -0,0 +1 @@
|
||||
## Test 4: Single Narrowed Window for a single buffer, switching back and forth between buffers several times (issue #44)
|
||||
@ -0,0 +1,4 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
@ -0,0 +1,6 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
Added Line
|
||||
[]
|
||||
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test5/cmd.sh
Executable file
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test5/cmd.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
|
||||
#set -x
|
||||
|
||||
Test=`basename $PWD`
|
||||
|
||||
dir="$(realpath ../..)"
|
||||
LC_ALL=C vim -u NONE -N \
|
||||
--cmd ':set noswapfile hidden' \
|
||||
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||
-c ':e 1.txt' \
|
||||
-c ':saveas! 1.txt.mod' \
|
||||
-c 'sil :1,$NR!' \
|
||||
-c 'sil :$put =\"Added Line\"' \
|
||||
-c ':wq' \
|
||||
-c ':$put =string(getmatches())' \
|
||||
-c ':wq!'
|
||||
|
||||
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||
if [ "$?" -ne 0 ]; then
|
||||
printf "$Test failed\n"
|
||||
printf "Diff:\n%s\n" "$rt"
|
||||
exit 2;
|
||||
else
|
||||
printf "$Test successful!\n"
|
||||
fi
|
||||
@ -0,0 +1 @@
|
||||
## Test 5: Make sure, highlighting is removed after closing narrowed window
|
||||
@ -0,0 +1,4 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
@ -0,0 +1,6 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
Added Line
|
||||
[]
|
||||
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test6/cmd.sh
Executable file
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test6/cmd.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
|
||||
#set -x
|
||||
|
||||
Test=`basename $PWD`
|
||||
|
||||
dir="$(realpath ../..)"
|
||||
LC_ALL=C vim -u NONE -N \
|
||||
--cmd ':set noswapfile hidden' \
|
||||
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||
-c ':e 1.txt' \
|
||||
-c ':saveas! 1.txt.mod' \
|
||||
-c 'exe ":1norm VG"|:norm \nr' \
|
||||
-c 'sil :$put =\"Added Line\"' \
|
||||
-c ':wq' \
|
||||
-c ':$put =string(getmatches())' \
|
||||
-c ':wq!'
|
||||
|
||||
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||
if [ "$?" -ne 0 ]; then
|
||||
printf "$Test failed\n"
|
||||
printf "Diff:\n%s\n" "$rt"
|
||||
exit 2;
|
||||
else
|
||||
printf "$Test successful!\n"
|
||||
fi
|
||||
@ -0,0 +1 @@
|
||||
## Test 6: Make sure, highlighting is removed after closing narrowed window (for visual narrowed region)
|
||||
@ -0,0 +1,4 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
@ -0,0 +1,5 @@
|
||||
This is a single test.
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
[]
|
||||
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test7/cmd.sh
Executable file
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test7/cmd.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
|
||||
#set -x
|
||||
|
||||
Test=`basename $PWD`
|
||||
|
||||
dir="$(realpath ../..)"
|
||||
LC_ALL=C vim -u NONE -N \
|
||||
--cmd ':set noswapfile hidden' \
|
||||
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||
-c ':e 1.txt' \
|
||||
-c ':saveas! 1.txt.mod' \
|
||||
-c ':%NR' \
|
||||
-c ':q!' \
|
||||
-c ':set modifiable' \
|
||||
-c ':$put =string(getmatches())' \
|
||||
-c ':wq!'
|
||||
|
||||
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||
if [ "$?" -ne 0 ]; then
|
||||
printf "$Test failed\n"
|
||||
printf "Diff:\n%s\n" "$rt"
|
||||
exit 2;
|
||||
else
|
||||
printf "$Test successful!\n"
|
||||
fi
|
||||
@ -0,0 +1 @@
|
||||
## Test 6: Make sure, highlighting is removed after aborting narrowed window (issue #44)
|
||||
Reference in New Issue
Block a user