Re: AppleScript is now deliberately annoying me to death
Re: AppleScript is now deliberately annoying me to death
- Subject: Re: AppleScript is now deliberately annoying me to death
- From: Axel Luttgens <email@hidden>
- Date: Fri, 04 Mar 2016 15:20:14 +0100
> Le 3 mars 2016 à 19:43, has a écrit :
>
> Hey folks,
>
> […]
> I would appreciate if some of you good folks who are also on 10.11 (which is what `osatest` is currently built for) could grab this particular revision (5eb49c5) from GitHub and see if you can replicate it too:
>
> https://github.com/hhas/applescript-stdlib
>
> I probably won’t check in any more changes this week, so you could just go download the ZIP if you don't want to muck about with `git` itself.
Hello Hamish,
I started with the zip thus (all files dated from yesterday, 09:46 +01:00).
> […]
> Open the `Date.unittest.scpt` file in the unittests folder in Script Editor and try running it. That particular script is currently working fine OMM (plus all its tests are passing, yay!), so it should return report text ending in "Result: 7 tests passed, 0 failed, 0 broken, 0 skipped."
One failure here:
Begin tests at 2016-03-04 13:21:53 +0000
1.1 JoinSplitDate's joinDate: FAILED on assertion 5 in ‘assert test result’ received incorrect result:
• actual result: date \"mardi 1 janvier 1850 00:00:00\"
• expected result: date \"mardi 1 janvier 1850 00:17:30\"
1.2 JoinSplitDate's splitDate: OK (performed 3 assertions)
2.1 ParseFormatDate's parseDate_ISO8601: OK (performed 3 assertions)
2.2 ParseFormatDate's formatDate_ISO8601: OK (performed 6 assertions)
2.3 ParseFormatDate's parseDate_customFormat: OK (performed 8 assertions)
2.4 ParseFormatDate's formatDate_customFormat: OK (performed 6 assertions)
3.1 Localization's timeZone: OK (performed 4 assertions)
Ended tests at 2016-03-04 13:21:54 +0000 (0.700s)
Result: 6 tests passed, 1 failed, 0 broken, 0 skipped.
> To run the same test in Terminal, run the following command (all one line):
>
> ~/Library/Script\ Libraries/TestTools.scptd/Contents/Resources/bin/osatest ~/Library/Script\ Libraries/unittests/Date.unittest.scpt
One failure again, exactly the same as above.
> Assuming that all works right (which it should), next open the `Number.unittest.scpt` in Script Editor and run that and see if it runs to completion or fails with an error like this:
>
> error "TestTools library can’t run unit tests: osatest '/Users/has/Library/Script Libraries/unittests/Number.unittest.scpt'
> Begin tests at 2016-03-03 18:27:53 +0000
> 1.1 ParseFormatNumber's formatNumber_integer: OK (performed 5 assertions)
> 1.2 ParseFormatNumber’s formatNumber_realDecimal: " number 1011 from «script "TestTools"»
To be sure, I’ve quit SE beforhand.
Same error as yours:
error "TestTools library can’t run unit tests: osatest '/Users/luttgens/Library/Script Libraries/unittests/number.unittest.scpt'
Begin tests at 2016-03-04 13:53:48 +0000
1.1 ParseFormatNumber's formatNumber_integer: OK (performed 5 assertions)
1.2 ParseFormatNumber’s formatNumber_realDecimal: " number 1011 from «script "TestTools"»
> Then try it in Terminal too:
>
> ~/Library/Script\ Libraries/TestTools.scptd/Contents/Resources/bin/osatest ~/Library/Script\ Libraries/unittests/Number.unittest.scpt
>
> *Normally* it runs fine in Terminal even when failing in SE, but this particular random revision's a real peach and most unusually gives me the following:
>
> osatest '/Users/has/Library/Script Libraries/unittests/Number.unittest.scpt'
> Begin tests at 2016-03-03 18:26:44 +0000
> 1.1 ParseFormatNumber's formatNumber_integer: OK (performed 5 assertions)
> 1.2 ParseFormatNumber’s formatNumber_realDecimal: Segmentation fault: 11
Immediate segfault:
osatest '/Users/luttgens/Library/Script Libraries/unittests/Number.unittest.scpt'
Begin tests at 2016-03-04 13:56:52 +0000
1.1 ParseFormatNumber's formatNumber_integer: OK (performed 5 assertions)
1.2 ParseFormatNumber’s formatNumber_realDecimal: Segmentation fault: 11
> Once you've done that, open `Number.unittest.scpt` in SE again and add the following comment to the top of the file:
>
> -- You don't have to be crazy to use AppleScript, oh wait...
>
> Save and run it once more, and see if it works now (it does OMM).
Indeed, no error:
Begin tests at 2016-03-04 13:59:03 +0000
1.1 ParseFormatNumber's formatNumber_integer: OK (performed 5 assertions)
1.2 ParseFormatNumber's formatNumber_realDecimal: OK (performed 7 assertions)
1.3 ParseFormatNumber's formatNumber_realScientific: OK (performed 6 assertions)
1.4 ParseFormatNumber's formatNumber_customFormat: OK (performed 9 assertions)
1.5 ParseFormatNumber's parseNumber_customFormat: SKIPPED TEST (performed no assertions)
1.6 ParseFormatNumber's formatNumber_locale: OK (performed 4 assertions)
1.7 ParseFormatNumber's parseNumber_locale: OK (performed 2 assertions)
2.1 GeneralOperations's roundNumber: OK (performed 1 assertions)
Ended tests at 2016-03-04 13:59:03 +0000 (0.658s)
Result: 7 tests passed, 0 failed, 0 broken, 1 skipped.
Tried several times in SE, even after some editing/saving/quits; the error does not seem to happen again, but I haven’t tried very hard. ;-)
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden