Skip to content

Commit

Permalink
Fix CLI bug and push v0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bovee committed Jun 28, 2024
1 parent faca9f5 commit 636daf1
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
include:
- os: ubuntu-latest
target: x86_64
- os: ubuntu-latest
target: armv7
- os: macos-latest
target: x64
- os: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion entab-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "entab-cli"
version = "0.3.2"
version = "0.3.3"
authors = ["Roderick <[email protected]>"]
edition = "2018"
description = "Record-format file reader CLI"
Expand Down
11 changes: 6 additions & 5 deletions entab-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ where
Arg::new("metadata")
.short('m')
.long("metadata")
.help("Reports metadata about the file instead of the data itself"),
.help("Reports metadata about the file instead of the data itself")
.action(clap::ArgAction::SetTrue),
)
.try_get_matches_from(args);

Expand Down Expand Up @@ -103,7 +104,7 @@ where
Box::new(stdout)
};

if matches.contains_id("metadata") {
if matches.get_flag("metadata") {
writer.write_all(b"key")?;
writer.write_all(&[params.main_delimiter])?;
writer.write_all(b"value")?;
Expand Down Expand Up @@ -153,19 +154,19 @@ mod tests {
fn test_output() -> Result<(), EtError> {
let mut out = Vec::new();
assert!(run(["entab"], &b">test\nACGT"[..], io::Cursor::new(&mut out)).is_ok());
println!("{}", std::str::from_utf8(&out).unwrap());
assert_eq!(&out[..], b"id\tsequence\ntest\tACGT\n");
Ok(())
}

#[test]
fn test_metadata() -> Result<(), EtError> {
let mut out = Vec::new();
assert!(run(
run(
["entab", "--metadata"],
&b">test\nACGT"[..],
io::Cursor::new(&mut out)
)
.is_ok());
)?;
assert_eq!(&out[..], b"key\tvalue\n");
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion entab-js/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "entab-js"
version = "0.3.2"
version = "0.3.3"
authors = ["Roderick <[email protected]>"]
license = "MIT"
description = "Record-format file reader"
Expand Down
2 changes: 1 addition & 1 deletion entab-py/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "entab-py"
version = "0.3.2"
version = "0.3.3"
authors = ["Roderick <[email protected]>"]
license = "MIT"
description = "Record-format file reader"
Expand Down
2 changes: 1 addition & 1 deletion entab-r/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "entab-r"
version = "0.3.2"
version = "0.3.3"
authors = ["Roderick <[email protected]>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion entab/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "entab"
version = "0.3.2"
version = "0.3.3"
authors = ["Roderick <[email protected]>"]
edition = "2018"
description = "Record-format file reader"
Expand Down

0 comments on commit 636daf1

Please sign in to comment.