Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Jun 17, 2024

πŸ“š Description

Implement new assert_line_count assertion function.

refs #257

πŸ”– Changes

  • Add assert_line_count

βœ… To-do list

  • I updated the CHANGELOG.md to reflect the new feature or fix
  • I updated the documentation to reflect the changes

@staabm staabm marked this pull request as ready for review June 17, 2024 07:42
if [ -z "$actual" ]; then
local actual_line_count=0
else
local actual_line_count=$(echo "$actual" | wc -l | tr -d '[:blank:]')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on my macos, wc -l returns a number prepended by whitespaces. therefore I used tr to strip them

Copy link
Member

@Chemaclass Chemaclass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! Just some minor comments

@Chemaclass Chemaclass added the enhancement New feature or request label Jun 17, 2024
Co-authored-by: Jose Maria Valera Reales <chemaclass@outlook.es>
Copy link
Member

@Chemaclass Chemaclass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Chemaclass Chemaclass merged commit b7114c4 into TypedDevs:main Jun 17, 2024
@staabm staabm deleted the line-count branch June 17, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants