Skip to content

Commit

Permalink
add mssql test
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Oct 26, 2023
1 parent 638e37f commit 6775599
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/mssql/mssql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,19 @@ async fn it_binds_empty_string_and_null() -> anyhow::Result<()> {
Ok(())
}

#[sqlx_macros::test]
async fn it_binds_string_with_special_chars() -> anyhow::Result<()> {
let mut conn = new::<Mssql>().await?;
let s = "/\r\n\t\0\x1b!@#$/.%^\x1b&*()_+";
let (val,): (String,) = sqlx_oldapi::query_as("SELECT @p1")
.bind(s)
.fetch_one(&mut conn)
.await?;
assert_eq!(val, s);

Ok(())
}

#[sqlx_macros::test]
async fn it_accepts_long_query_strings() -> anyhow::Result<()> {
let mut conn = new::<Mssql>().await?;
Expand Down

0 comments on commit 6775599

Please sign in to comment.