Skip to content

Commit

Permalink
add tests for notes without newline marker
Browse files Browse the repository at this point in the history
  • Loading branch information
thehunmonkgroup committed Feb 28, 2021
1 parent 0230a47 commit 672f271
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions onenote_test
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ T_validTaskWithNoNotesReturnsEmptyNote() {
}

T_validTaskWithNotesReturnsValidFormattedNote() {
export ONENOTE_TEST_NOTES="foo\nbar\n\nbaz"
result="$(${executable} 1)"
echo "With notes result: ${result}"
[[ "${result}" = "${ONENOTE_TEST_NOTES}" ]]
}

T_validTaskWithNotesAndNewlineMarkerReturnsValidFormattedNote() {
export ONENOTE_TEST_NOTES="foo${newline}bar${newline}${newline}baz"
result="$(${executable} 1)"
echo "With notes result: ${result}"
Expand All @@ -53,6 +60,14 @@ T_validTaskWithNoNotesWithDefaultContentReturnsNoteWithDefaultContent() {
}

T_validTaskWithNotesWithDefaultContentReturnsValidFormattedNote() {
export ONENOTE_TEST_NOTES="foo\nbar\n\nbaz"
export ONENOTE_DEFAULT_CONTENT="test"
result="$(${executable} 1)"
echo "With notes with default content result: ${result}"
[[ "${result}" = "${ONENOTE_TEST_NOTES}" ]]
}

T_validTaskWithNotesWithDefaultContentAndNewlineMarkerReturnsValidFormattedNote() {
export ONENOTE_TEST_NOTES="foo${newline}bar${newline}${newline}baz"
export ONENOTE_DEFAULT_CONTENT="test"
result="$(${executable} 1)"
Expand Down

0 comments on commit 672f271

Please sign in to comment.