comparison src/testdir/test_filetype.vim @ 26296:9f32ccdadd22 v8.2.3679

patch 8.2.3679: objc file detected as Octave Commit: https://github.com/vim/vim/commit/7329cfab36356c48edab7ed68f6244eb9e20a5b1 Author: Doug Kearns <dougkearns@gmail.com> Date: Fri Nov 26 13:01:41 2021 +0000 patch 8.2.3679: objc file detected as Octave Problem: objc file detected as Octave. (Antony Lee) Solution: Detect objc by preprocessor lines. (Doug Kearns, closes https://github.com/vim/vim/issues/9223, closes #9220)
author Bram Moolenaar <Bram@vim.org>
date Fri, 26 Nov 2021 14:15:05 +0100
parents 741cb243a7d2
children 270ac1efc93b
comparison
equal deleted inserted replaced
26295:84d52b86a6b3 26296:9f32ccdadd22
889 call writefile(['#import "test.m"'], 'Xfile.m') 889 call writefile(['#import "test.m"'], 'Xfile.m')
890 split Xfile.m 890 split Xfile.m
891 call assert_equal('objc', &filetype) 891 call assert_equal('objc', &filetype)
892 bwipe! 892 bwipe!
893 893
894 call writefile(['#include <header.h>'], 'Xfile.m')
895 split Xfile.m
896 call assert_equal('objc', &filetype)
897 bwipe!
898
899 call writefile(['#define FORTY_TWO'], 'Xfile.m')
900 split Xfile.m
901 call assert_equal('objc', &filetype)
902 bwipe!
903
894 " Octave 904 " Octave
895 905
896 call writefile(['# Octave line comment'], 'Xfile.m') 906 call writefile(['# Octave line comment'], 'Xfile.m')
897 split Xfile.m 907 split Xfile.m
898 call assert_equal('octave', &filetype) 908 call assert_equal('octave', &filetype)