mirror of
https://github.com/neovim/neovim.git
synced 2026-03-15 13:27:22 +00:00
Merge pull request #36825 from zeertzjq/vim-9.1.1950
vim-patch:9.1.{1950,1952}
This commit is contained in:
@@ -2351,6 +2351,49 @@ func Test_tf_file()
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_tf_file_v2()
|
||||
filetype on
|
||||
|
||||
let lines =<< trim END
|
||||
;# Connect to a MUD server
|
||||
/server mud.example.com 4000
|
||||
;set verbose on
|
||||
/def greet = /echo Hello, $[name()]
|
||||
/def hp = /send score
|
||||
;alias n = north
|
||||
;alias s = south
|
||||
;set autolog on
|
||||
/def prompt = /echo -p Prompt: %{*}
|
||||
END
|
||||
|
||||
call writefile(lines, "Xfile.tf", "D")
|
||||
split Xfile.tf
|
||||
call assert_equal('tf', &filetype)
|
||||
bw!
|
||||
let lines =<< trim END
|
||||
# This is a comment at the top of the file
|
||||
|
||||
terraform {
|
||||
required_version = ">= 1.0"
|
||||
}
|
||||
|
||||
provider "aws" {
|
||||
region = "us-east-1"
|
||||
}
|
||||
|
||||
resource "aws_s3_bucket" "demo" {
|
||||
bucket = "example-bucket"
|
||||
}
|
||||
END
|
||||
call writefile(lines, "Xfile.tf", "D")
|
||||
split Xfile.tf
|
||||
call assert_equal('terraform', &filetype)
|
||||
bwipe!
|
||||
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
|
||||
func Test_ts_file()
|
||||
filetype on
|
||||
|
||||
|
||||
@@ -1349,7 +1349,7 @@ func Test_inc_search()
|
||||
call assert_fails('isplit 6 foo', 'E389:')
|
||||
call assert_fails('isplit bar', 'E389:')
|
||||
|
||||
close!
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
" this was using a line from ml_get() freed by the regexp
|
||||
@@ -1462,7 +1462,7 @@ func Test_macro_search()
|
||||
call assert_fails('dsplit 6 FOO', 'E388:')
|
||||
call assert_fails('dsplit BAR', 'E388:')
|
||||
|
||||
close!
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_define_search()
|
||||
@@ -1508,7 +1508,7 @@ func Test_comment_search()
|
||||
call assert_beeps('normal! 15|[/')
|
||||
call setline(1, ' /* comment')
|
||||
call assert_beeps('normal! 15|]/')
|
||||
close!
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
" Test for the 'taglength' option
|
||||
|
||||
Reference in New Issue
Block a user