Skip to content

Commit

Permalink
pcli: fix spurious matches on gm balances
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor authored and conorsch committed Aug 16, 2023
1 parent 022980d commit 2407079
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions crates/bin/pcli/tests/network_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,11 @@ fn swap() {
// Address 0 has 100gm.
.stdout(predicate::str::is_match(format!(r"0\s*100gm")).unwrap())
// Address 1 has no gm.
.stdout(predicate::str::is_match(format!(r"1\s.*gm")).unwrap().not())
.stdout(
predicate::str::is_match(format!(r"1\s[0-9]*\.?[0-9]gm"))
.unwrap()
.not(),
)
// Address 0 has some penumbra.
.stdout(predicate::str::is_match(format!(r"0\s*.*penumbra")).unwrap())
// Address 1 has 1001penumbra.
Expand Down Expand Up @@ -625,7 +629,11 @@ fn swap() {
// Address 0 has 100gm.
.stdout(predicate::str::is_match(format!(r"0\s*100gm")).unwrap())
// Address 1 has no gm.
.stdout(predicate::str::is_match(format!(r"1\s.*gm")).unwrap().not())
.stdout(
predicate::str::is_match(format!(r"1\s[0-9]*\.?[0-9]gm"))
.unwrap()
.not(),
)
// Address 0 has some penumbra.
.stdout(predicate::str::is_match(format!(r"0\s*.*penumbra")).unwrap())
// Address 1 has 1000penumbra.
Expand Down Expand Up @@ -665,7 +673,11 @@ fn swap() {
// Address 0 has 100gm.
.stdout(predicate::str::is_match(format!(r"0\s*99gm")).unwrap())
// Address 1 has no gm.
.stdout(predicate::str::is_match(format!(r"1\s.*gm")).unwrap().not())
.stdout(
predicate::str::is_match(format!(r"1\s[0-9]*\.?[0-9]gm"))
.unwrap()
.not(),
)
// Address 0 has some penumbra.
.stdout(predicate::str::is_match(format!(r"0\s*.*penumbra")).unwrap())
// Address 1 has 1000penumbra.
Expand Down

0 comments on commit 2407079

Please sign in to comment.