aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_filetype.vim32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index 83aff0205b..4daa321ec7 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -1598,6 +1598,38 @@ func Test_html_file()
call assert_equal('htmldjango', &filetype)
bwipe!
+ " Super html layout
+ let content = ['<extend template="base.shtml">',
+ \ '<title id="title" var="$page.title"></title>',
+ \ '<head id="head"></head>',
+ \ '<div id="content">',
+ \ '</div>']
+ call writefile(content, 'Xfile.shtml', 'D')
+ split Xfile.shtml
+ call assert_equal('superhtml', &filetype)
+ bwipe!
+
+ " Super html template
+ let content = ['<!DOCTYPE html>',
+ \ '<html>',
+ \ ' <head id="head">',
+ \ ' <title id="title">',
+ \ ' <super>',
+ \ ' suffix',
+ \ ' </title>',
+ \ ' <super>',
+ \ ' </head>',
+ \ ' <body>',
+ \ ' <div id="content">',
+ \ ' <super>',
+ \ ' </div>',
+ \ ' </body>',
+ \ '</html>']
+ call writefile(content, 'Xfile.shtml', 'D')
+ split Xfile.shtml
+ call assert_equal('superhtml', &filetype)
+ bwipe!
+
" regular HTML
let content = ['<!DOCTYPE html>', '<html>', ' <head>Foobar</head>', ' <body>Content', ' </body>', '</html>']
call writefile(content, 'Xfile.html', 'D')