From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 46FC824585 for ; Wed, 9 May 2018 13:20:39 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rcQhMgoCGnF2 for ; Wed, 9 May 2018 13:20:39 -0400 (EDT) Received: from forward4p.cmail.yandex.net (forward4p.cmail.yandex.net [77.88.31.19]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id BD9E024584 for ; Wed, 9 May 2018 13:20:38 -0400 (EDT) From: roman.habibov1@yandex.ru In-Reply-To: <225ED31B-14F7-4BF1-9383-2100722DFEF2@tarantool.org> References: <2050311525824390@web59j.yandex.ru> <225ED31B-14F7-4BF1-9383-2100722DFEF2@tarantool.org> Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: Tests for CREATE TEMP TABLE and CREATE TEMPORARY TABLE MIME-Version: 1.0 Message-Id: <6369401525886435@web18j.yandex.ru> Date: Wed, 09 May 2018 20:20:35 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: "n.pettik" , "tarantool-patches@freelists.org" > Please, read guidelines carefully. > >> sql: Tests for CREATE TEMP TABLE and CREATE TEMPORARY TABLE > > According to our docs: > — 2. Try to limit the subject line to 50 characters or so. > — 3. Start the subject line with a capital letter unless it prefixed with a subsystem name and semicolon… Sorry. I fixed that. > Also, it is not clear what have you done with these ’tests’: removed/fixed/added etc. That too. >> + >> +-- gh-2166 Tables with TEMP and TEMPORARY were removed before. >> + > > Leading space at the last line. Enable showing whitespaces to avoid such codestyle violations. >> + }) >> +test:do_catchsql_test( >> + "temporary", > >> + 1, "near \"TEMPORARY\": syntax error" >> + -- >> + }) >> test:do_execsql2_test( That too. > Separate tests with blank line. diff --git a/test/sql-tap/table.test.lua b/test/sql-tap/table.test.lua index 70b22d2..84eb884 100755 --- a/test/sql-tap/table.test.lua +++ b/test/sql-tap/table.test.lua @@ -623,6 +623,7 @@ test:do_catchsql_test( 1, "near \"TEMP\": syntax error" -- }) + test:do_catchsql_test( "temporary", [[ @@ -632,6 +633,7 @@ test:do_catchsql_test( 1, "near \"TEMPORARY\": syntax error" -- }) + test:do_execsql2_test( "table-8.6", [[ > I would also add tests (or just rewrite yours) which check that complete CREATE TABLE statement doesn’t support TEMP clause: > > CREATE TEMP TABLE t1(…); > > CREATE TEMPORARY TABLE t1(…); diff --git a/test/sql-tap/table.test.lua b/test/sql-tap/table.test.lua index c71e4b9..70b22d2 100755 --- a/test/sql-tap/table.test.lua +++ b/test/sql-tap/table.test.lua @@ -613,11 +613,11 @@ test:do_execsql2_test( -- } {cnt 1 max(b+c) 5} -- gh-2166 Tables with TEMP and TEMPORARY were removed before. - + test:do_catchsql_test( "temp", [[ - CREATE TEMP TABLE + CREATE TEMP TABLE t1(); ]], { -- 1, "near \"TEMP\": syntax error" @@ -626,7 +626,7 @@ test:do_catchsql_test( test:do_catchsql_test( "temporary", [[ - CREATE TEMPORARY TABLE + CREATE TEMPORARY TABLE t1(); ]], { -- 1, "near \"TEMPORARY\": syntax error"