pub struct CommandTest {
pub given: String,
pub when: String,
pub then: String,
}Expand description
One Given/When/Then shell test on a command node.
Names must follow given_…_when_…_then_… (spaces or hyphens are fine).
when is extra argv for the command this test is declared on (shell-expanded);
omit it to invoke that command with no extra args. stdout/stderr/status of that
invocation are captured as JAN_STATUS / JAN_STDOUT / JAN_STDERR for then.
Fields§
§given: StringSetup (files, fixtures). Optional.
when: StringExtra argv after the command this test is declared on. Optional.
then: StringAssertions against the captured when result and any files from given.
Implementations§
Trait Implementations§
Source§impl Clone for CommandTest
impl Clone for CommandTest
Source§fn clone(&self) -> CommandTest
fn clone(&self) -> CommandTest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandTest
impl Debug for CommandTest
Source§impl Default for CommandTest
impl Default for CommandTest
Source§fn default() -> CommandTest
fn default() -> CommandTest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CommandTest
impl<'de> Deserialize<'de> for CommandTest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CommandTest
Source§impl PartialEq for CommandTest
impl PartialEq for CommandTest
impl StructuralPartialEq for CommandTest
Auto Trait Implementations§
impl Freeze for CommandTest
impl RefUnwindSafe for CommandTest
impl Send for CommandTest
impl Sync for CommandTest
impl Unpin for CommandTest
impl UnsafeUnpin for CommandTest
impl UnwindSafe for CommandTest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.