Skip to content

Commit

Permalink
Format validator.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoliaw committed Aug 29, 2024
1 parent 0e39b45 commit fe974c3
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions inquire/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,10 @@ mod validators_test {
let validator: &dyn StringValidator = &validator;

assert!(matches!(validator.validate("five!")?, Validation::Valid));
assert!(matches!(validator.validate("♥️♥️♥️♥️♥️")?, Validation::Valid));
assert!(matches!(
validator.validate("♥️♥️♥️♥️♥️")?,
Validation::Valid
));
assert!(matches!(
validator.validate("🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️")?,
Validation::Valid
Expand Down Expand Up @@ -771,7 +774,10 @@ mod validators_test {

assert!(matches!(validator.validate("")?, Validation::Valid));
assert!(matches!(validator.validate("five!")?, Validation::Valid));
assert!(matches!(validator.validate("♥️♥️♥️♥️♥️")?, Validation::Valid));
assert!(matches!(
validator.validate("♥️♥️♥️♥️♥️")?,
Validation::Valid
));
assert!(matches!(
validator.validate("🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️")?,
Validation::Valid
Expand Down Expand Up @@ -855,8 +861,14 @@ mod validators_test {

assert!(matches!(validator.validate("five!")?, Validation::Valid));
assert!(matches!(validator.validate("five!!!")?, Validation::Valid));
assert!(matches!(validator.validate("♥️♥️♥️♥️♥️")?, Validation::Valid));
assert!(matches!(validator.validate("♥️♥️♥️♥️♥️♥️")?, Validation::Valid));
assert!(matches!(
validator.validate("♥️♥️♥️♥️♥️")?,
Validation::Valid
));
assert!(matches!(
validator.validate("♥️♥️♥️♥️♥️♥️")?,
Validation::Valid
));
assert!(matches!(
validator.validate("🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️")?,
Validation::Valid
Expand Down

0 comments on commit fe974c3

Please sign in to comment.