From 667e42788ede9b088eeee9366b6959d9c6fd18f2 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 13 Dec 2024 03:55:05 +0200 Subject: [PATCH] add `strip_prefix` test --- src/app/browser/window/tab/item/page/navigation/request.rs | 1 + .../browser/window/tab/item/page/navigation/request/test.rs | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 src/app/browser/window/tab/item/page/navigation/request/test.rs diff --git a/src/app/browser/window/tab/item/page/navigation/request.rs b/src/app/browser/window/tab/item/page/navigation/request.rs index 694c3d6b..2d2d24c7 100644 --- a/src/app/browser/window/tab/item/page/navigation/request.rs +++ b/src/app/browser/window/tab/item/page/navigation/request.rs @@ -1,4 +1,5 @@ mod database; +mod test; mod widget; use widget::Widget; diff --git a/src/app/browser/window/tab/item/page/navigation/request/test.rs b/src/app/browser/window/tab/item/page/navigation/request/test.rs new file mode 100644 index 00000000..1223933d --- /dev/null +++ b/src/app/browser/window/tab/item/page/navigation/request/test.rs @@ -0,0 +1,6 @@ +#[cfg(test)] +#[test] +fn strip_prefix() { + assert_eq!(super::strip_prefix("source:gemini".into()), "gemini"); + assert_eq!(super::strip_prefix("download:gemini".into()), "gemini"); +}