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

Not working on Mac OS X 10.7.5 #3

Merged
merged 2 commits into from Nov 3, 2012
Merged

Not working on Mac OS X 10.7.5 #3

merged 2 commits into from Nov 3, 2012

Conversation

duksis
Copy link
Contributor

@duksis duksis commented Oct 13, 2012

Tried to run the test suite and got the following:

$ ./tests.sh 
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
all 8 demo tests passed in s.
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
test #8 "_clean INVARIANT=;
assert_end | egrep 'all 0 tests passed in [0-9].[0-9]{3}s'" failed:
    program terminated with code 1 instead of 0
1 of 9 output tests failed in s.
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
all 7 regression tests passed in s.
duksihug@WL038424 ~/code/assert.sh (master)
$ echo $BASH_VERSION
3.2.48(1)-release

looks like one of the causes is that the default date command shipped with mac os does not have a %N (nanosecond) formatting option
https://github.com/lehmannro/assert.sh/blob/master/assert.sh#L66

P.S.
Great project - would love to use it.

@lehmannro
Copy link
Owner

Thanks for the report! date indeed seems to be the culprit: It leaves straw %N tokens around when it cannot understand them. Subsequently, bc trips up when trying to calculate 123.%N - 120.%N.
It should be fixed in b7a4213 — can you confirm?

@duksis
Copy link
Contributor Author

duksis commented Oct 11, 2012

Not sure if this was intended that way but b7a4213 returns the github 404 page

@lehmannro
Copy link
Owner

Could you try again? It works for me now.

@duksis
Copy link
Contributor Author

duksis commented Oct 13, 2012

the link works now, but the test suite don't

$ ./tests.sh 
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
all 9 demo tests passed in s.
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
test #8 "_clean INVARIANT=;
assert_end | egrep 'all 0 tests passed in [0-9].[0-9]{3}s'" failed:
    program terminated with code 1 instead of 0
1 of 13 output tests failed in s.
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
all 7 regression tests passed in s.

@duksis
Copy link
Contributor Author

duksis commented Oct 13, 2012

Added code that works for me:

  • non existing formatting option adds a ".N" to the string at-least for me.
  • and one of the tests expects nanoseconds but they are not there

lehmannro added a commit that referenced this pull request Nov 3, 2012
@lehmannro lehmannro merged commit 22f559b into lehmannro:master Nov 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants