diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2024-11-15 08:39:12 +0100 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2024-11-15 09:32:15 +0100 |
| commit | a785be9cc70152a297f00ee2018a25b8a33bf848 (patch) | |
| tree | 53d7f75590622b36988dd5d32351fbfd9362589e /runtime/indent/testdir | |
| parent | c9045f5ba3b721a451f307e22dff095c4e0e7bd8 (diff) | |
| download | rneovim-a785be9cc70152a297f00ee2018a25b8a33bf848.tar.gz rneovim-a785be9cc70152a297f00ee2018a25b8a33bf848.tar.bz2 rneovim-a785be9cc70152a297f00ee2018a25b8a33bf848.zip | |
vim-patch:0acd3ab: runtime(sh): better function support for bash/zsh in indent script
closes: vim/vim#16052
https://github.com/vim/vim/commit/0acd3abfadf54a97a3cad999791603aa6a8b2248
Co-authored-by: Lukas Zapletal <lzap+git@redhat.com>
Diffstat (limited to 'runtime/indent/testdir')
| -rw-r--r-- | runtime/indent/testdir/bash.in | 22 | ||||
| -rw-r--r-- | runtime/indent/testdir/bash.ok | 22 |
2 files changed, 44 insertions, 0 deletions
diff --git a/runtime/indent/testdir/bash.in b/runtime/indent/testdir/bash.in new file mode 100644 index 0000000000..7ffcfc7a9d --- /dev/null +++ b/runtime/indent/testdir/bash.in @@ -0,0 +1,22 @@ +#!/bin/bash +# vim: set ft=bash sw=2 noet: + +# START_INDENT +a = 10 +b = 20 + +function add() { +c = $((a + b)) +} + +function print { +# do nothing +} + +if [[ $c -ge 15 ]]; +then +print("ok") +else +print("not ok") +fi +# END_INDENT diff --git a/runtime/indent/testdir/bash.ok b/runtime/indent/testdir/bash.ok new file mode 100644 index 0000000000..93d5b33c38 --- /dev/null +++ b/runtime/indent/testdir/bash.ok @@ -0,0 +1,22 @@ +#!/bin/bash +# vim: set ft=bash sw=2 noet: + +# START_INDENT +a = 10 +b = 20 + +function add() { + c = $((a + b)) +} + +function print { + # do nothing +} + +if [[ $c -ge 15 ]]; +then + print("ok") +else + print("not ok") +fi +# END_INDENT |