Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/test_types/custom_command.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: run a custom command sent by the client
custom command
SUCCESS
"""
When receiving the command '{ "command": "repeatTest" }'
When receiving the command '{ "command": "repeat-test" }'
Then it prints
"""
executing: echo custom command
Expand Down
4 changes: 2 additions & 2 deletions features/test_types/repeat_last_command.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ Feature: repeat the last command
running all tests
SUCCESS
"""
When receiving the command '{ "command": "repeatTest" }'
When receiving the command '{ "command": "repeat-test" }'
Then it prints
"""
executing: echo running all tests
running all tests
SUCCESS
"""
When receiving the command '{ "command": "repeatTest" }'
When receiving the command '{ "command": "repeat-test" }'
Then it prints
"""
executing: echo running all tests
Expand Down
4 changes: 2 additions & 2 deletions src/client/fifo_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ mod tests {

#[test]
fn repeat_test() {
let give = S(r#"{ "command": "repeatTest" }"#);
let give = S(r#"{ "command": "repeat-test" }"#);
let have = FifoTrigger::parse(give.clone()).unwrap();
let want = FifoTrigger {
data: FifoTriggerData {
command: S("repeatTest"),
command: S("repeat-test"),
..FifoTriggerData::default()
},
original_line: give,
Expand Down
6 changes: 3 additions & 3 deletions src/client/trigger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl Display for Trigger {
Trigger::TestFile { file } => write!(f, "test-file {file}"),
Trigger::TestFileLine { file, line } => write!(f, "test-file-line {file}:{line}"),
Trigger::CustomCommand { run } => write!(f, "custom-command {run}"),
Trigger::RepeatLastTest => f.write_str("repeatTest"),
Trigger::RepeatLastTest => f.write_str("repeat-test"),
Trigger::Quit => f.write_str("quit"),
}
}
Expand All @@ -33,7 +33,7 @@ impl TryFrom<FifoTrigger> for Trigger {
fn try_from(fifo: FifoTrigger) -> std::result::Result<Self, Self::Error> {
match fifo.data.command.to_ascii_lowercase().as_str() {
"test-all" => Ok(Trigger::TestAll),
"repeattest" => Ok(Trigger::RepeatLastTest),
"repeat-test" => Ok(Trigger::RepeatLastTest),
"custom-command" => match fifo.data.run {
Some(run) => Ok(Trigger::CustomCommand { run }),
None => Err(UserError::MissingRunInTrigger { original: fifo.original_line }),
Expand Down Expand Up @@ -88,7 +88,7 @@ mod tests {
fn repeat_test() {
let fifo_data = FifoTrigger {
data: FifoTriggerData {
command: S("repeatTest"),
command: S("repeat-test"),
..FifoTriggerData::default()
},
..FifoTrigger::default()
Expand Down