MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_lpad_rpad

Function test_lpad_rpad

src/functions/string_functions.rs:390–407  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

388
389 #[test]
390 fn test_lpad_rpad() {
391 let conn = Connection::open_in_memory().unwrap();
392 register_string_functions(&conn).unwrap();
393
394 let result: String = conn.query_row(
395 "SELECT lpad('hello', 8, 'x')",
396 [],
397 |row| row.get(0)
398 ).unwrap();
399 assert_eq!(result, "xxxhello");
400
401 let result: String = conn.query_row(
402 "SELECT rpad('hello', 8, 'x')",
403 [],
404 |row| row.get(0)
405 ).unwrap();
406 assert_eq!(result, "helloxxx");
407 }
408}

Callers

nothing calls this directly

Calls 2

getMethod · 0.45

Tested by

no test coverage detected