(t *testing.T)
| 17 | import "testing" |
| 18 | |
| 19 | func TestDropDatabase(t *testing.T) { |
| 20 | RunScripts(t, []ScriptTest{ |
| 21 | { |
| 22 | Name: "simple create database", |
| 23 | Assertions: []ScriptTestAssertion{ |
| 24 | { |
| 25 | Query: "CREATE DATABASE testdb", |
| 26 | }, |
| 27 | { |
| 28 | Query: "DROP DATABASE testdb", |
| 29 | }, |
| 30 | }, |
| 31 | }, |
| 32 | { |
| 33 | Name: "with quotes", |
| 34 | Assertions: []ScriptTestAssertion{ |
| 35 | { |
| 36 | Query: "CREATE DATABASE testdb", |
| 37 | }, |
| 38 | { |
| 39 | Query: "DROP DATABASE \"testdb\"", |
| 40 | }, |
| 41 | }, |
| 42 | }, |
| 43 | { |
| 44 | Name: "with hyphen", |
| 45 | Assertions: []ScriptTestAssertion{ |
| 46 | { |
| 47 | Query: "CREATE DATABASE \"test-db\"", |
| 48 | }, |
| 49 | { |
| 50 | Query: "USE \"test-db\"", |
| 51 | }, |
| 52 | }, |
| 53 | }, |
| 54 | { |
| 55 | Name: "if exists", |
| 56 | Assertions: []ScriptTestAssertion{ |
| 57 | { |
| 58 | Query: "DROP DATABASE IF EXISTS invalid", |
| 59 | }, |
| 60 | }, |
| 61 | }, |
| 62 | }) |
| 63 | } |
nothing calls this directly
no test coverage detected