dart-lang / yaml_edit

A library for YAML manipulation with comment and whitespace preservation.
https://pub.dev/packages/yaml_edit
BSD 3-Clause "New" or "Revised" License
27 stars 16 forks source link

Additional test cases #33

Open jonasfj opened 1 year ago

jonasfj commented 1 year ago

This package could use more test cases.

Both of the kind in here: https://github.com/dart-lang/yaml_edit/tree/main/test/testdata

And of the kind written in test/*_test.dart.

Issues like broken string escaping noticed in https://github.com/dart-lang/yaml_edit/pull/28 indicate that we could probably use more test cases.

An approach to systematically test more of the code, or perhaps some code-coverage could be useful to.

MikiPAUL commented 1 year ago

@jonasfj , I would love to take on this task! I am confident that I can make a contribution here. Would you mind assigning this issue to me? Thank you!

jonasfj commented 1 year ago

Sure, no problem.

jonasfj commented 1 year ago

Honestly, anyone is welcome to help write a few test cases. Especially, if we can make some test cases that finds new bugs, then we can file issues to fix those bugs :D

jonasfj commented 1 year ago

In particular, we need test cases for strings that contain special characters, line breaks and the lines. I think we have issues when such strings are formatted as folded strings, etc.

seifibrahim32 commented 1 month ago

@jonasfj I will add some tests before I try to add for https://github.com/dart-lang/yaml_edit/issues/26