From 2c26a48617019bd1f105374f3c7d63935eb42416 Mon Sep 17 00:00:00 2001 From: "aviator-app[bot]" Date: Mon, 1 Apr 2024 17:55:39 +0000 Subject: [PATCH] Auto-update from GitHub Actions Run: https://github.com/r-dbi/RMariaDB/actions/runs/8511586608 --- tests/testthat/test-dbQuoteIdentifier.R | 30 ++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/testthat/test-dbQuoteIdentifier.R b/tests/testthat/test-dbQuoteIdentifier.R index 2f42a63e..3ee46df3 100644 --- a/tests/testthat/test-dbQuoteIdentifier.R +++ b/tests/testthat/test-dbQuoteIdentifier.R @@ -5,7 +5,7 @@ test_that("quoting string", { quoted <- dbQuoteIdentifier(con, "Robert'); DROP TABLE Students;--") expect_s4_class(quoted, 'SQL') expect_equal(as.character(quoted), - "`Robert'); DROP TABLE Students;--`") + "`Robert'); DROP TABLE Students;--`") }) test_that("quoting SQL", { @@ -15,7 +15,7 @@ test_that("quoting SQL", { quoted <- dbQuoteIdentifier(con, SQL("Robert'); DROP TABLE Students;--")) expect_s4_class(quoted, 'SQL') expect_equal(as.character(quoted), - "Robert'); DROP TABLE Students;--") + "Robert'); DROP TABLE Students;--") }) test_that("quoting Id", { @@ -25,7 +25,7 @@ test_that("quoting Id", { quoted <- dbQuoteIdentifier(con, Id(schema = 'Robert', table = 'Students;--')) expect_s4_class(quoted, 'SQL') expect_equal(as.character(quoted), - "`Robert`.`Students;--`") + "`Robert`.`Students;--`") }) test_that("quoting Id with column, #254", { @@ -35,7 +35,7 @@ test_that("quoting Id with column, #254", { quoted <- dbQuoteIdentifier(con, Id(schema = 'Robert', table = 'Students;--', column = "dormitory")) expect_s4_class(quoted, 'SQL') expect_equal(as.character(quoted), - "`Robert`.`Students;--`.`dormitory`") + "`Robert`.`Students;--`.`dormitory`") }) test_that("quoting Id with column, unordered", { @@ -45,7 +45,7 @@ test_that("quoting Id with column, unordered", { quoted <- dbQuoteIdentifier(con, Id(column = "dormitory", table = 'Students;--')) expect_s4_class(quoted, 'SQL') expect_equal(as.character(quoted), - "`Students;--`.`dormitory`") + "`Students;--`.`dormitory`") }) test_that("quoting errors", { @@ -60,19 +60,19 @@ test_that("unquoting identifier - SQL with quotes", { on.exit(dbDisconnect(con)) expect_equal(dbUnquoteIdentifier(con, SQL('`Students;--`')), - list(Id(table = 'Students;--'))) + list(Id(table = 'Students;--'))) expect_equal(dbUnquoteIdentifier(con, SQL('`Robert`.`Students;--`')), - list(Id(schema = 'Robert', table = 'Students;--'))) + list(Id(schema = 'Robert', table = 'Students;--'))) expect_equal(dbUnquoteIdentifier(con, SQL('`Rob``ert`.`Students;--`')), - list(Id(schema = 'Rob`ert', table = 'Students;--'))) + list(Id(schema = 'Rob`ert', table = 'Students;--'))) expect_equal(dbUnquoteIdentifier(con, SQL('`Rob.ert`.`Students;--`')), - list(Id(schema = 'Rob.ert', table = 'Students;--'))) + list(Id(schema = 'Rob.ert', table = 'Students;--'))) expect_error(dbUnquoteIdentifier(con, SQL('`Robert.`Students`')), - "^Can't unquote") + "^Can't unquote") }) test_that("unquoting identifier - SQL without quotes", { @@ -80,13 +80,13 @@ test_that("unquoting identifier - SQL without quotes", { on.exit(dbDisconnect(con)) expect_equal(dbUnquoteIdentifier(con, SQL('Students')), - list(Id(table = 'Students'))) + list(Id(table = 'Students'))) expect_equal(dbUnquoteIdentifier(con, SQL('Robert.Students')), - list(Id(schema = 'Robert', table = 'Students'))) + list(Id(schema = 'Robert', table = 'Students'))) expect_error(dbUnquoteIdentifier(con, SQL('Rob``ert.Students')), - "^Can't unquote") + "^Can't unquote") }) test_that("unquoting identifier - Id", { @@ -94,6 +94,6 @@ test_that("unquoting identifier - Id", { on.exit(dbDisconnect(con)) expect_equal(dbUnquoteIdentifier(con, - Id(schema = 'Robert', table = 'Students;--')), - list(Id(schema = 'Robert', table = 'Students;--'))) + Id(schema = 'Robert', table = 'Students;--')), + list(Id(schema = 'Robert', table = 'Students;--'))) })