summaryrefslogtreecommitdiffstats
path: root/src/parse.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-01-10 23:01:56 -0500
committerJesse Luehrs <doy@tozt.net>2022-01-10 23:01:56 -0500
commit5bce22093b4b0778f729d8d92e37f42214f78fc5 (patch)
tree67273fffaa237d9a6c6d0b8cd2e9c1987345ea94 /src/parse.rs
parent3c18ba5b58f4239054e809b07d795308f75b8602 (diff)
downloadnbsh-5bce22093b4b0778f729d8d92e37f42214f78fc5.tar.gz
nbsh-5bce22093b4b0778f729d8d92e37f42214f78fc5.zip
add tests
Diffstat (limited to 'src/parse.rs')
-rw-r--r--src/parse.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/parse.rs b/src/parse.rs
index 09cdb91..cc6d92b 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -1,6 +1,6 @@
pub mod ast;
-#[derive(Debug)]
+#[derive(Debug, Eq, PartialEq)]
pub struct Pipeline {
exes: Vec<Exe>,
}
@@ -11,7 +11,7 @@ impl Pipeline {
}
}
-#[derive(Debug)]
+#[derive(Debug, Eq, PartialEq)]
pub struct Exe {
exe: std::path::PathBuf,
args: Vec<String>,
@@ -36,14 +36,14 @@ impl Exe {
}
}
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, Eq, PartialEq)]
pub struct Redirect {
pub from: std::os::unix::io::RawFd,
pub to: RedirectTarget,
pub dir: Direction,
}
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, Eq, PartialEq)]
pub enum RedirectTarget {
Fd(std::os::unix::io::RawFd),
File(std::path::PathBuf),
@@ -99,7 +99,7 @@ impl Direction {
}
}
-#[derive(Debug)]
+#[derive(Debug, Eq, PartialEq)]
pub struct Error {
input: String,
e: pest::error::Error<ast::Rule>,