diff --git a/src/lib.rs b/src/lib.rs index cb4b14b..cebe4f7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1494,7 +1494,7 @@ mod test { #[test] #[cfg(feature = "extra_check")] - fn test_execute_select() { + fn test_execute_select_with_no_row() { let db = checked_memory_handle(); let err = db.execute("SELECT 1 WHERE 1 < ?1", [1i32]).unwrap_err(); assert_eq!( @@ -1504,6 +1504,17 @@ mod test { ); } + #[test] + fn test_execute_select_with_row() { + let db = checked_memory_handle(); + let err = db.execute("SELECT 1", []).unwrap_err(); + assert_eq!( + err, + Error::ExecuteReturnedResults, + "Unexpected error: {err}" + ); + } + #[test] #[cfg(feature = "extra_check")] fn test_execute_multiple() {