From ae916d49fd907592a73676fc1f570f75d67353d2 Mon Sep 17 00:00:00 2001 From: Hugo Musso Gualandi Date: Fri, 5 Feb 2021 11:40:43 -0300 Subject: [PATCH] Add test case for gnumakefile detection --- test/test_c_flag_parsing.vader | 8 ++++++++ test/test_c_projects/gnumakefile_project/GNUmakefile | 0 test/test_c_projects/gnumakefile_project/file.c | 0 3 files changed, 8 insertions(+) create mode 100644 test/test_c_projects/gnumakefile_project/GNUmakefile create mode 100644 test/test_c_projects/gnumakefile_project/file.c diff --git a/test/test_c_flag_parsing.vader b/test/test_c_flag_parsing.vader index 8b02f2b9..319e10dd 100644 --- a/test/test_c_flag_parsing.vader +++ b/test/test_c_flag_parsing.vader @@ -38,6 +38,14 @@ Execute(The make command should be correct): \ . 'make -n', \ ale#c#GetMakeCommand(bufnr('')) +Execute(Should recognize GNUmakefile as a makefile): + call ale#test#SetFilename('test_c_projects/gnumakefile_project/file.c') + + AssertEqual + \ ale#path#CdString(ale#path#Simplify(g:dir. '/test_c_projects/gnumakefile_project')) + \ . 'make -n --always-make', + \ ale#c#GetMakeCommand(bufnr('')) + Execute(The CFlags parser should be able to parse include directives): call ale#test#SetFilename('test_c_projects/makefile_project/subdir/file.c') diff --git a/test/test_c_projects/gnumakefile_project/GNUmakefile b/test/test_c_projects/gnumakefile_project/GNUmakefile new file mode 100644 index 00000000..e69de29b diff --git a/test/test_c_projects/gnumakefile_project/file.c b/test/test_c_projects/gnumakefile_project/file.c new file mode 100644 index 00000000..e69de29b