]> git.phdru.name Git - sqlconvert.git/commitdiff
Test mysql2sql with tox
authorOleg Broytman <phd@phdru.name>
Sun, 19 Mar 2017 16:41:33 +0000 (19:41 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 19 Mar 2017 16:41:33 +0000 (19:41 +0300)
tests/mysql2sql/test.out [new file with mode: 0644]
tox.ini

diff --git a/tests/mysql2sql/test.out b/tests/mysql2sql/test.out
new file mode 100644 (file)
index 0000000..60d3271
--- /dev/null
@@ -0,0 +1,15 @@
+SELECT * FROM mytable; -- line-comment"
+
+INSERT INTO /* inline comment */ mytable VALUES (1, 'ั‚ะตัั‚');
+
+
+INSERT INTO "MyTable" ("Id", "Name")
+VALUES (1, 'one');
+
+INSERT INTO mytable VALUES  (1, 'one');
+INSERT INTO mytable VALUES  (2, 'two');
+
+INSERT INTO mytable (id, name) VALUES  (1, 'one');
+INSERT INTO mytable (id, name) VALUES  (2, 'two');
+
+-- The end
diff --git a/tox.ini b/tox.ini
index 0dfe51a56f82c3be608e66955c810f8b71b1f117..229abb742cedf5ebbcbbbee593473f032cd4f797 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -21,11 +21,15 @@ whitelist_externals =
     flake8
     createdb
     dropdb
+    cmp
     rm
 
 [general]
 commands =
     python -m pytest --cov=sqlconvert
+    mysql2sql demo/demo.sql test.out
+    cmp -s tests/mysql2sql/test.out test.out
+    rm test.out
 
 [testenv:py26]
 commands = {[general]commands}