-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b54d07
commit bc9c253
Showing
26 changed files
with
210 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
parse error at line 1 column 8 for CrLf: | ||
!prefix: command | ||
^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
!prefix: command | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
parse error at line 1 column 2 for Tag: | ||
!(command) | ||
^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
!(command) | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
command '_error' failed at line 1: message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_error message | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
expected command '_echo' to fail at line 1, succeeded with: message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
! _echo message | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_panic message | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
# A bare command. | ||
command | ||
--- | ||
Command { name: "command", args: [], prefix: None, silent: false, line_number: 2 } | ||
Command { name: "command", args: [], prefix: None, silent: false, fail: false, line_number: 2 } | ||
|
||
# Commands with arguments. | ||
foo arg | ||
bar key=value | ||
baz arg key=value | ||
--- | ||
Command { name: "foo", args: [Argument { key: None, value: "arg" }], prefix: None, silent: false, line_number: 7 } | ||
Command { name: "bar", args: [Argument { key: Some("key"), value: "value" }], prefix: None, silent: false, line_number: 8 } | ||
Command { name: "baz", args: [Argument { key: None, value: "arg" }, Argument { key: Some("key"), value: "value" }], prefix: None, silent: false, line_number: 9 } | ||
Command { name: "foo", args: [Argument { key: None, value: "arg" }], prefix: None, silent: false, fail: false, line_number: 7 } | ||
Command { name: "bar", args: [Argument { key: Some("key"), value: "value" }], prefix: None, silent: false, fail: false, line_number: 8 } | ||
Command { name: "baz", args: [Argument { key: None, value: "arg" }, Argument { key: Some("key"), value: "value" }], prefix: None, silent: false, fail: false, line_number: 9 } | ||
|
||
# Commands with prefixes. | ||
a: foo arg | ||
b: bar key=value | ||
--- | ||
a: Command { name: "foo", args: [Argument { key: None, value: "arg" }], prefix: Some("a"), silent: false, line_number: 16 } | ||
b: Command { name: "bar", args: [Argument { key: Some("key"), value: "value" }], prefix: Some("b"), silent: false, line_number: 17 } | ||
a: Command { name: "foo", args: [Argument { key: None, value: "arg" }], prefix: Some("a"), silent: false, fail: false, line_number: 16 } | ||
b: Command { name: "bar", args: [Argument { key: Some("key"), value: "value" }], prefix: Some("b"), silent: false, fail: false, line_number: 17 } | ||
|
||
# Failing commands. | ||
! foo bar | ||
--- | ||
Error: Command { name: "foo", args: [Argument { key: None, value: "bar" }], prefix: None, silent: false, fail: true, line_number: 23 } | ||
|
||
# Both prefixes, commands, and argument identifiers can be whitespace, but not | ||
# empty (tested under errors/). | ||
" ": " " " "=" " | ||
--- | ||
: Command { name: " ", args: [Argument { key: Some(" "), value: " " }], prefix: Some(" "), silent: false, line_number: 24 } | ||
: Command { name: " ", args: [Argument { key: Some(" "), value: " " }], prefix: Some(" "), silent: false, fail: false, line_number: 29 } | ||
|
||
# Empty argument values are fine. | ||
command "" | ||
command arg="" | ||
command arg= | ||
--- | ||
Command { name: "command", args: [Argument { key: None, value: "" }], prefix: None, silent: false, line_number: 29 } | ||
Command { name: "command", args: [Argument { key: Some("arg"), value: "" }], prefix: None, silent: false, line_number: 30 } | ||
Command { name: "command", args: [Argument { key: Some("arg"), value: "" }], prefix: None, silent: false, line_number: 31 } | ||
Command { name: "command", args: [Argument { key: None, value: "" }], prefix: None, silent: false, fail: false, line_number: 34 } | ||
Command { name: "command", args: [Argument { key: Some("arg"), value: "" }], prefix: None, silent: false, fail: false, line_number: 35 } | ||
Command { name: "command", args: [Argument { key: Some("arg"), value: "" }], prefix: None, silent: false, fail: false, line_number: 36 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# ! is parsed correctly into the fail attribute. It is output as an error, since | ||
# the runner expects an error. | ||
! command arg | ||
--- | ||
Error: Command { name: "command", args: [Argument { key: None, value: "arg" }], prefix: None, silent: false, fail: true, line_number: 3 } | ||
|
||
# Errors and panics are handled when ! is given. | ||
! _error foo | ||
--- | ||
Error: foo | ||
|
||
! _panic foo | ||
--- | ||
Panic: foo | ||
|
||
# () can be used to silence the output. | ||
(!_error foo) | ||
(!_panic foo) | ||
--- | ||
ok | ||
|
||
# Prefixes can be used too. | ||
a: ! _error foo | ||
b:!_panic foo | ||
--- | ||
a: Error: foo | ||
b: Panic: foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.