Crate assert_text

Crate assert_text 

Source
Expand description

the testing macro tools.

This checks that strings are equal. You will see different characters if that is different.

§Features

  • assert_text_eq!(txt1, txt2)
  • assert_text_contains!(txt1, txt2)
  • assert_text_starts_with!(txt1, txt2)
  • assert_text_ends_with!(txt1, txt2)
  • assert_text_match!(txt1, regex_text2)
  • minimum support rustc 1.65.0 (897e37553 2022-11-02)

Macros§

assert_text_contains
Asserts that the first text contains the given second text.
assert_text_ends_with
Asserts that the first text expression ends with the second text expression.
assert_text_eq
Asserts that two text expressions are equal.
assert_text_match
Asserts that the first text expression matches the given regular expression.
assert_text_starts_with
Asserts that the first text expression starts with the second text expression.

Functions§

print_diff_github_style
Prints a GitHub-style diff between two text slices to stdout.