From 6c4fd0298792d234261a6978238078f4e6e3de13 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 22 Jun 2020 20:36:51 -0400 Subject: Added tests for external ctags, file_diff, history, and spellcheck modules. --- test/modules/ctags/c/include/foo.h | 7 +++++++ test/modules/ctags/c/src/foo.c | 11 +++++++++++ test/modules/ctags/lua/foo.lua | 15 +++++++++++++++ test/modules/file_diff/1 | 18 ++++++++++++++++++ test/modules/file_diff/2 | 19 +++++++++++++++++++ test/modules/history/1 | 20 ++++++++++++++++++++ test/modules/history/2 | 20 ++++++++++++++++++++ 7 files changed, 110 insertions(+) create mode 100644 test/modules/ctags/c/include/foo.h create mode 100644 test/modules/ctags/c/src/foo.c create mode 100644 test/modules/ctags/lua/foo.lua create mode 100644 test/modules/file_diff/1 create mode 100644 test/modules/file_diff/2 create mode 100644 test/modules/history/1 create mode 100644 test/modules/history/2 (limited to 'test/modules') diff --git a/test/modules/ctags/c/include/foo.h b/test/modules/ctags/c/include/foo.h new file mode 100644 index 00000000..2b98544a --- /dev/null +++ b/test/modules/ctags/c/include/foo.h @@ -0,0 +1,7 @@ +#include + +void foo(int i) { + printf("foo %d\n", i); +} + +#define FOO 1 diff --git a/test/modules/ctags/c/src/foo.c b/test/modules/ctags/c/src/foo.c new file mode 100644 index 00000000..25b65b69 --- /dev/null +++ b/test/modules/ctags/c/src/foo.c @@ -0,0 +1,11 @@ +#include "foo.h" + +void bar() { + printf("bar\n"); +} + +int main(int argc, char **argv) { + foo(FOO); + bar(); + return 0; +} diff --git a/test/modules/ctags/lua/foo.lua b/test/modules/ctags/lua/foo.lua new file mode 100644 index 00000000..6988b7f3 --- /dev/null +++ b/test/modules/ctags/lua/foo.lua @@ -0,0 +1,15 @@ +function foo() end +local function bar() end +baz = {} +function baz:quux() end + +--[[ For LuaDoc +module('foo')]] +local M = {} + +--- +-- Foo +-- @name new +function M.new() end + +return M diff --git a/test/modules/file_diff/1 b/test/modules/file_diff/1 new file mode 100644 index 00000000..b6180b61 --- /dev/null +++ b/test/modules/file_diff/1 @@ -0,0 +1,18 @@ +this is the first line +this is the second line + third line starts with space ++ starts with a plus sign + this one with one tab + now with full two tabs + now tabs everywhere, much fun + +this line won't change + +two lines are going to +be changed into three! + +three of those lines will +collapse onto one +(to see if it works) + +this is the last line diff --git a/test/modules/file_diff/2 b/test/modules/file_diff/2 new file mode 100644 index 00000000..b120faf3 --- /dev/null +++ b/test/modules/file_diff/2 @@ -0,0 +1,19 @@ +that is the first paragraph + this is the second line +third line starts with space +- starts with a minus sign + this one with two tab + now with full three tabs + now there are tabs everywhere, much fun + +this line won't change + +two lines are going to +(entirely magically, + assuming this works) +be changed into four! + +three of those lines have +collapsed onto one + +this is the last line diff --git a/test/modules/history/1 b/test/modules/history/1 new file mode 100644 index 00000000..7b050800 --- /dev/null +++ b/test/modules/history/1 @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/test/modules/history/2 b/test/modules/history/2 new file mode 100644 index 00000000..7b050800 --- /dev/null +++ b/test/modules/history/2 @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3