From 1a21ef9593fd573b22cbcff38e8637ebcbdd9432 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Fri, 30 Dec 2022 10:25:43 +0100 Subject: [PATCH] =?UTF-8?q?test:=20=F0=9F=A7=AA=20Add=20a=20test=20case:?= =?UTF-8?q?=20Export=20file=20path=20is=20a=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index 4c55d4a..7b542e0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -516,5 +516,7 @@ mod tests { get_export_file(Some(PathBuf::from("/home/user/export.sh"))), Ok(export_file) )); + // Path is a directory instead of a file + assert!(get_export_file(Some(home_dir)).is_err()); } }