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

Next release ? #164

Open
williamdes opened this issue Dec 21, 2022 · 4 comments
Open

Next release ? #164

williamdes opened this issue Dec 21, 2022 · 4 comments

Comments

@williamdes
Copy link
Collaborator

williamdes commented Dec 21, 2022

Hi @kward

Could we have a git tag for your latest changes ?

2.1.9pre would perfect, so we can test if there is breaking changes, for example with Debian packages.
That are broken currently: https://tracker.debian.org/pkg/shunit2

I reviewed diff for v2.1.8...master excluding test files

List of interesting fixes:

@williamdes
Copy link
Collaborator Author

This tests run fine on 2.1.6 and not 2.1.8: https://salsa.debian.org/debian/icmake/-/blob/debian/latest/debian/tests/run-unit-test

You can clone and run the file to test. I reduced it to this example

#!/bin/sh

set -u

test_foobar () {
    assertEquals "foo" "foo"
    assertEquals "bar" "bar"
}

testFindString() {
    local OUT="And another 'hello world'"

    assertNotSame "missing output from icmake -e" "" "${OUT}"
    #assertTrue echo "${OUT}" | grep -q "And another 'hello world'"
}

testTrueIsTrue() {
    assertTrue "true"

    # shunit's function examples
    assertTrue 0
    assertTrue "[ 34 -gt 23 ]"

    # shunit's function examples for fail
    assertTrue 123
    assertTrue "test failed" "[ -r '/non/existent/file' ]"

    assertTrue "1"
}

testFalseIsFalse() {
    assertFalse "false"

    # shunit's function examples
    assertFalse 1
    assertFalse "[ 'apples' = 'oranges' ]"

    # shunit's function examples for fail
    assertFalse 0
    assertFalse "test failed" "[ 1 -eq 1 -a 2 -eq 2 ]"

    assertFalse "0"
}

. shunit2

@williamdes
Copy link
Collaborator Author

I think this shunit2:ERROR testTrueIsTrue() returned non-zero return code. should be fixed before the final version is out.
It's a bug that was not present on the old version

2.1.6

(removed set -e)

test_foobar
testFindString
testTrueIsTrue
ASSERT:
testFalseIsFalse
ASSERT:

Ran 4 tests.

FAILED (failures=2)

2.1.8

(removed set -e)

test_foobar
testFindString
testTrueIsTrue
ASSERT:
shunit2:ERROR testTrueIsTrue() returned non-zero return code.
testFalseIsFalse
ASSERT:
shunit2:ERROR testFalseIsFalse() returned non-zero return code.

Ran 4 tests.

FAILED (failures=4)

@williamdes
Copy link
Collaborator Author

Seems to be #154 and #162 too

@williamdes
Copy link
Collaborator Author

I found out that #84 (f08632b#diff-a453761d888ea6645a651da189e89605523e4eab9500ee9e5988e55bca4f437bR892-R896) was the reason why the tests did not output an error before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant