From fceb1a37df623649d191c3c1a881e5b0538b1391 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 3 Mar 2020 19:39:02 -0500 Subject: Added test suite and API type checking for more helpful error messages. --- test/file_io/binary | Bin 0 -> 65 bytes test/file_io/cp1252 | 1 + test/file_io/crlf | 3 +++ test/file_io/lf | 3 +++ test/file_io/utf16 | Bin 0 -> 90 bytes test/file_io/utf8 | 1 + test/modules/textadept/editing/api2 | 4 ++++ test/modules/textadept/run/build.lua | 2 ++ test/modules/textadept/run/compile.lua | 2 ++ test/modules/textadept/run/run.lua | 2 ++ test/modules/textadept/snippets/bar | 1 + test/modules/textadept/snippets/baz.txt | 1 + test/modules/textadept/snippets/lua.bar | 1 + test/modules/textadept/snippets/lua.baz.lua | 1 + test/ui/dir1/file1 | 0 test/ui/dir1/file2 | 0 test/ui/dir2/file1 | 0 test/ui/dir2/file2 | 0 test/ui/empty | 0 test/ui/test.lua | 3 +++ test/ui/uri drop | 0 21 files changed, 25 insertions(+) create mode 100644 test/file_io/binary create mode 100644 test/file_io/cp1252 create mode 100644 test/file_io/crlf create mode 100644 test/file_io/lf create mode 100644 test/file_io/utf16 create mode 100644 test/file_io/utf8 create mode 100644 test/modules/textadept/editing/api2 create mode 100644 test/modules/textadept/run/build.lua create mode 100644 test/modules/textadept/run/compile.lua create mode 100644 test/modules/textadept/run/run.lua create mode 100644 test/modules/textadept/snippets/bar create mode 100644 test/modules/textadept/snippets/baz.txt create mode 100644 test/modules/textadept/snippets/lua.bar create mode 100644 test/modules/textadept/snippets/lua.baz.lua create mode 100644 test/ui/dir1/file1 create mode 100644 test/ui/dir1/file2 create mode 100644 test/ui/dir2/file1 create mode 100644 test/ui/dir2/file2 create mode 100644 test/ui/empty create mode 100644 test/ui/test.lua create mode 100644 test/ui/uri drop (limited to 'test') diff --git a/test/file_io/binary b/test/file_io/binary new file mode 100644 index 00000000..e4127eff Binary files /dev/null and b/test/file_io/binary differ diff --git a/test/file_io/cp1252 b/test/file_io/cp1252 new file mode 100644 index 00000000..9860f939 --- /dev/null +++ b/test/file_io/cp1252 @@ -0,0 +1 @@ +Copyright © 2007-2020 Mitchell. See LICENSE. diff --git a/test/file_io/crlf b/test/file_io/crlf new file mode 100644 index 00000000..c4806e92 --- /dev/null +++ b/test/file_io/crlf @@ -0,0 +1,3 @@ +foo +bar +baz diff --git a/test/file_io/lf b/test/file_io/lf new file mode 100644 index 00000000..86e041da --- /dev/null +++ b/test/file_io/lf @@ -0,0 +1,3 @@ +foo +bar +baz diff --git a/test/file_io/utf16 b/test/file_io/utf16 new file mode 100644 index 00000000..8f935072 Binary files /dev/null and b/test/file_io/utf16 differ diff --git a/test/file_io/utf8 b/test/file_io/utf8 new file mode 100644 index 00000000..4278c33e --- /dev/null +++ b/test/file_io/utf8 @@ -0,0 +1 @@ +Copyright © 2007-2020 Mitchell. See LICENSE. diff --git a/test/modules/textadept/editing/api2 b/test/modules/textadept/editing/api2 new file mode 100644 index 00000000..1f4e05ff --- /dev/null +++ b/test/modules/textadept/editing/api2 @@ -0,0 +1,4 @@ +foo2 Foo2 +bar2 Bar2 +baz2 Baz2 +quux2 Quux2 diff --git a/test/modules/textadept/run/build.lua b/test/modules/textadept/run/build.lua new file mode 100644 index 00000000..dd288778 --- /dev/null +++ b/test/modules/textadept/run/build.lua @@ -0,0 +1,2 @@ +print('read "' .. io.read() .. '"') +io.read() diff --git a/test/modules/textadept/run/compile.lua b/test/modules/textadept/run/compile.lua new file mode 100644 index 00000000..0645da72 --- /dev/null +++ b/test/modules/textadept/run/compile.lua @@ -0,0 +1,2 @@ +-- Missing 'end' +function foo() diff --git a/test/modules/textadept/run/run.lua b/test/modules/textadept/run/run.lua new file mode 100644 index 00000000..a61508e9 --- /dev/null +++ b/test/modules/textadept/run/run.lua @@ -0,0 +1,2 @@ +print('lua: run.lua:1: warning: foo') +foo() diff --git a/test/modules/textadept/snippets/bar b/test/modules/textadept/snippets/bar new file mode 100644 index 00000000..76018072 --- /dev/null +++ b/test/modules/textadept/snippets/bar @@ -0,0 +1 @@ +baz diff --git a/test/modules/textadept/snippets/baz.txt b/test/modules/textadept/snippets/baz.txt new file mode 100644 index 00000000..d90bda0f --- /dev/null +++ b/test/modules/textadept/snippets/baz.txt @@ -0,0 +1 @@ +quux diff --git a/test/modules/textadept/snippets/lua.bar b/test/modules/textadept/snippets/lua.bar new file mode 100644 index 00000000..d90bda0f --- /dev/null +++ b/test/modules/textadept/snippets/lua.bar @@ -0,0 +1 @@ +quux diff --git a/test/modules/textadept/snippets/lua.baz.lua b/test/modules/textadept/snippets/lua.baz.lua new file mode 100644 index 00000000..5716ca59 --- /dev/null +++ b/test/modules/textadept/snippets/lua.baz.lua @@ -0,0 +1 @@ +bar diff --git a/test/ui/dir1/file1 b/test/ui/dir1/file1 new file mode 100644 index 00000000..e69de29b diff --git a/test/ui/dir1/file2 b/test/ui/dir1/file2 new file mode 100644 index 00000000..e69de29b diff --git a/test/ui/dir2/file1 b/test/ui/dir2/file1 new file mode 100644 index 00000000..e69de29b diff --git a/test/ui/dir2/file2 b/test/ui/dir2/file2 new file mode 100644 index 00000000..e69de29b diff --git a/test/ui/empty b/test/ui/empty new file mode 100644 index 00000000..e69de29b diff --git a/test/ui/test.lua b/test/ui/test.lua new file mode 100644 index 00000000..413f4a92 --- /dev/null +++ b/test/ui/test.lua @@ -0,0 +1,3 @@ +if true then + print() +end diff --git a/test/ui/uri drop b/test/ui/uri drop new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3