Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organize tests #762

Merged
merged 26 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4f0ffac
Add doctests for Deref implementations of events
Mingun Jun 18, 2024
624891d
Move definition of BytesDecl after BytesPI
Mingun Jun 18, 2024
0059377
Move all writer-only tests from tests/unit_tests.rs to tests/writer.rs
Mingun Jun 18, 2024
1ebc396
Add base tests of event writing
Mingun Jun 18, 2024
1b6a0e6
Remove duplicated roundtrip test
Mingun Jun 18, 2024
37852e0
Check documents after roundtrip as strings
Mingun Jun 18, 2024
866e1cd
Remove unnecessary wrapping in Cursor in roundtrip tests
Mingun Jun 18, 2024
837b9e2
Remove unnecessary set of trim_text option
Mingun Jun 18, 2024
c05ea3c
Move all roundtrip tests from tests/unit_tests.rs to tests/roundtrip.rs
Mingun Jun 18, 2024
a48c88f
Use traditional tests with explicit .unwrap() instead of returning er…
Mingun Jun 18, 2024
92574dd
Add tests for roundtrip of each possible event except Eof
Mingun Jun 18, 2024
c3272e6
Use direct comparison of events instead of using macro
Mingun Jun 18, 2024
db582ce
Move all attribute reading tests to tests/reader-attributes.rs
Mingun Jun 18, 2024
361a78c
Rename tests/unit_tests.rs to tests/reader.rs
Mingun Jun 18, 2024
a5331bd
Merge tests/test.rs into tests/reader.rs
Mingun Jun 18, 2024
a7ee294
Rename tests/namespaces.rs to tests/reader-namespaces.rs
Mingun Jun 18, 2024
6ce0944
Remove excess tests from xmlrs_reader_tests.rs
Mingun Jun 18, 2024
fa5d052
Replace test issue_default_namespace_on_outermost_element with more f…
Mingun Jun 18, 2024
f567a74
Move default_ns_* tests into the module default_namespace
Mingun Jun 18, 2024
eff9a86
Replace test issue_105_unexpected_double_dash with more formal test i…
Mingun Jun 19, 2024
e1e3489
More strict encoding tests - check that we get expected events
Mingun Jun 19, 2024
625c74e
Replace test bom_removed_from_initial_text with more formal test in t…
Mingun Jun 20, 2024
e9cab59
Replace test `escaped_characters` with `escape::test_escape`
Mingun Jun 20, 2024
3321944
Remove not working and commented tests
Mingun Jun 20, 2024
7463d2a
Remove namespaced reader tests from xmlrs_reader_tests.rs
Mingun Jun 21, 2024
486e64e
Remove non-namespaced reader tests from xmlrs_reader_tests.rs
Mingun Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,10 @@ fn test_unescape() {
assert_eq!(unchanged, Cow::Borrowed("test"));
assert!(matches!(unchanged, Cow::Borrowed(_)));

assert_eq!(unescape("&lt;test&gt;").unwrap(), "<test>");
assert_eq!(
unescape("&lt;&amp;test&apos;&quot;&gt;").unwrap(),
"<&test'\">"
);
assert_eq!(unescape("&#x30;").unwrap(), "0");
assert_eq!(unescape("&#48;").unwrap(), "0");
assert!(unescape("&foo;").is_err());
Expand Down
Loading
Loading