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

Add assert_line_count #259

Merged
merged 3 commits into from
Jun 17, 2024
Merged

Add assert_line_count #259

merged 3 commits into from
Jun 17, 2024

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

CHANGELOG.md Outdated Show resolved Hide resolved
docs/assertions.md Outdated Show resolved Hide resolved
@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
7 checks passed
@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