1 | #include "catch.hpp" |
---|---|
2 | #include "duckdb/common/file_system.hpp" |
3 | #include "dbgen.hpp" |
4 | #include "test_helpers.hpp" |
5 | |
6 | using namespace duckdb; |
7 | using namespace std; |
8 | |
9 | TEST_CASE("Test quoted column name", "[schema]") { |
10 | unique_ptr<QueryResult> result; |
11 | DuckDB db(nullptr); |
12 | Connection con(db); |
13 | |
14 | REQUIRE_NO_FAIL(con.Query("CREATE TABLE integers(\"42\" INTEGER)")); |
15 | REQUIRE_NO_FAIL(con.Query("INSERT INTO integers VALUES (33)")); |
16 | result = con.Query("SELECT \"42\" FROM integers;"); |
17 | REQUIRE(CHECK_COLUMN(result, 0, {33})); |
18 | } |
19 |