summary refs log tree commit diff stats
path: root/src/ed.rs
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-05-28 18:18:32 -0400
committerBen Morrison <ben@gbmor.dev>2020-05-28 18:18:32 -0400
commit2cb85a4f5922be57a43470bde828d8f92138de40 (patch)
tree687f5e80d8b0fb46948ed9f3eec22d49eda39658 /src/ed.rs
parentec59c5f5d846b15a81629dc670d2e13a1a15b5f4 (diff)
downloadclinte-2cb85a4f5922be57a43470bde828d8f92138de40.tar.gz
testing create/delete
Diffstat (limited to 'src/ed.rs')
-rw-r--r--src/ed.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ed.rs b/src/ed.rs
index b87b4a1..468e008 100644
--- a/src/ed.rs
+++ b/src/ed.rs
@@ -1,10 +1,15 @@
-use std::env;
 use std::fs;
+
+#[cfg(not(test))]
+use std::env;
+#[cfg(not(test))]
 use std::process;
 
 use chrono::prelude::*;
 
+#[cfg(not(test))]
 use crate::error;
+
 use crate::user;
 
 fn create_tmp_file() -> Result<String, std::io::Error> {
@@ -16,6 +21,7 @@ fn create_tmp_file() -> Result<String, std::io::Error> {
     }
 }
 
+#[cfg(not(test))]
 pub fn call(body: &str) -> String {
     // If they don't have $EDITOR set, just default to nano
     // instead of assuming vim or emacs.