summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-11-14 21:32:32 +0200
committerLars Wirzenius <liw@liw.fi>2023-11-14 21:32:32 +0200
commite412a594ef83e164e12a4da38be83101a3c08ac2 (patch)
treea88c5c9cf54b7babf64febee2419b9f8f70dbb0d
parent03f499514b785446650d6e9c3938634b9ecbbf75 (diff)
downloadpathdedup-e412a594ef83e164e12a4da38be83101a3c08ac2.tar.gz
first unit test
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rw-r--r--src/main.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 7b7c4be..a1e2a8a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -6,3 +6,13 @@ fn main() -> anyhow::Result<()> {
fn pathdedup(path: &str) -> String {
path.into()
}
+
+#[cfg(test)]
+mod test {
+ use super::pathdedup;
+
+ #[test]
+ fn empty_string() {
+ assert_eq!(pathdedup(""), "");
+ }
+}