Skip to content
Snippets Groups Projects
Commit 73ccee63 authored by Kirill Yukhin's avatar Kirill Yukhin Committed by Konstantin Osipov
Browse files

sql: Introduce `sql-tap` test suite.

	This test suite is supposed to contain tests converted from
	sqlite's TCL testsuite.

	test/
	* sql-tap/lua/sqltester.lua: New test wrapper.
	* sql-tap/suite.ini: New test suite initializer.

	* sql-tap/select3.[test.lua,result]: New test and expected result.

sql: [#2381] Convert `whereK.test`.

	test/sql-tap/
	* lua/sqltester.lua (flatten): Reindent.
	(do_test): Introduce matching. If expected result is single line
	which starts w/ '/' and ends w/ '/' then search for such string
	w/o '/'s in whole table. If found - test pass.
	(execsql): Reindent.
	* whereK.[test.lua,result]: New.

sql: [#2381] Convert `insert1.test`.

	test/sql-tap/
	* lua/sqltester.lua (header): Remove excessive includes.
	(fix_result): New routine intended to fix recieved result.
	Initially it simply convert values of boolean types to numbers.
	(do_test): Use fix_result.
	(execsql): Cleanup.
	(lsearch): New. Try to roughly mimic TCL's lsearch.
	* insert1.[test.lua,result]: New test.

sql: [#2381] Convert `update.test`.

	test/sql-tap/
	* lua/sqltester.lua (do_test): If result is nil - set it to empty table.
	(db): Use execsql instead of direct box.sql.execute.
	* update.[test.lua, result]: New.

sql: Add sql-tap/with1.test.

Function with1.test.lua:limit_test() completely re-written.
parent a37df626
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment