Add tests for first extension

This commit is contained in:
PThorpe92 2025-01-12 17:32:20 -05:00
parent e4ce6402eb
commit 9c208dc866
No known key found for this signature in database
GPG key ID: 66DB3FBACBDD05CC
9 changed files with 205 additions and 79 deletions

View file

@ -323,6 +323,7 @@ impl Limbo {
};
}
#[cfg(not(target_family = "wasm"))]
fn handle_load_extension(&mut self, path: &str) -> Result<(), String> {
self.conn.load_extension(path).map_err(|e| e.to_string())
}
@ -550,7 +551,9 @@ impl Limbo {
let _ = self.writeln(e.to_string());
};
}
Command::LoadExtension => {
Command::LoadExtension =>
{
#[cfg(not(target_family = "wasm"))]
if let Err(e) = self.handle_load_extension(args[1]) {
let _ = self.writeln(&e);
}