|
|
@@ -45,4 +45,18 @@ mod tests {
|
|
45
|
45
|
assert_eq!(parse("RETRIEVE Hello\n"), Ok(Command::Retrieve))
|
|
46
|
46
|
}
|
|
47
|
47
|
|
|
|
48
|
+ #[test]
|
|
|
49
|
+ fn stage_with_newline_returns_correct_command() {
|
|
|
50
|
+ assert_eq!(parse("STAGE 123\n456"), Ok(Command::Stage("123".to_string())))
|
|
|
51
|
+ }
|
|
|
52
|
+
|
|
|
53
|
+ #[test]
|
|
|
54
|
+ fn control_with_newline_returns_correct_command() {
|
|
|
55
|
+ assert_eq!(parse("Control 123\n456"), Ok(Command::Control("123".to_string())))
|
|
|
56
|
+ }
|
|
|
57
|
+
|
|
|
58
|
+ #[test]
|
|
|
59
|
+ fn retrieve_with_newline_returns_correct_command() {
|
|
|
60
|
+ assert_eq!(parse("RETRIEVE 123\n456"), Ok(Command::Retrieve))
|
|
|
61
|
+ }
|
|
48
|
62
|
}
|