patch 9.1.1952: tests: need better tests for tf files

Commit: 
https://github.com/vim/vim/commit/23f23e611fcfb8a74ba4f09a23bda8eaaddfe585
Author: Christian Brabandt <[email protected]>
Date:   Wed Dec 3 21:01:37 2025 +0000

    patch 9.1.1952: tests: need better tests for tf files
    
    Problem:  tests: need better tests for tf files
    Solution: Add better filetype test for terraform/tf filetype
    
    closes: #18339
    
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 84aa338e5..677c74191 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -2395,6 +2395,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
 
diff --git a/src/version.c b/src/version.c
index 86bc9841b..4924bc84d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1952,
 /**/
     1951,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vQuBj-00F1ES-PM%40256bit.org.

Raspunde prin e-mail lui