Skip to content

Commit

Permalink
added test for invalid custom tag
Browse files Browse the repository at this point in the history
  • Loading branch information
pwinckles committed Feb 22, 2022
1 parent 9fe7a69 commit ad83670
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/bin/bagr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,6 @@ fn bag_cmd(sub_args: BagCmd) -> Result<Bag> {
bag_info.add_tag(split.0.trim(), split.1.trim())?;
}

// TODO test for invalid custom tags

create_bag(
defaulted_path(sub_args.source),
defaulted_path(sub_args.destination),
Expand Down
9 changes: 9 additions & 0 deletions tests/cmd/bag/invalid-custom-tag.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fs.sandbox = true
fs.base = "basic-bag.in"

bin.name = "bagr"
args = "bag --tag labelvalue"
status = "failed"
stderr = """
[ERROR] Failed to create bag: Invalid tag line: Label and value must be separated by a ':'. Found: labelvalue
"""

0 comments on commit ad83670

Please sign in to comment.