creating a test & patch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

creating a test & patch

Siemen Baader
Hi Amber Contributors,

I need help on setting up a unit test and creating a patch.

the current version of amber that installs with npm is broken on OSX:

    $ npm install amber-cli
    $ amber
    env: node\r: No such file or directory

The cause is that the /usr/local/lib/node_modules/amber-cli/cli/support/amber-cli.js file has windows \r/n line feeds, and OSX env cannot handle that (it thinks \r is part of the command name).

The fix (that I think will work on nodejs for Win as well) will be to use unix encoded files only.

I want to write a command line automated test that fails when any built files contain \r\n, convert the files, and submit a pull request.

There is no info on docs.amber-lang.net or https://github.com/amber-smalltalk/amber/wiki on how to create these tests.


Would anyone walk me through the process?

best,
Siemen

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: creating a test & patch

Herby Vojčík
Ah, sorry.

I probably forgot and ran npm publish from Windows.
I'm going to fix this by unpublishing the last version and publishing it under UNIX.

(git for windows does autocovert in both directions, so everything's ok unless I npm publish the windows state)

Herby

Siemen Baader wrote:

> Hi Amber Contributors,
>
> I need help on setting up a unit test and creating a patch.
>
> the current version of amber that installs with npm is broken on OSX:
>
>      $ npm install amber-cli
>      $ amber
>      env: node\r: No such file or directory
>
> The cause is that the /usr/local/lib/node_modules/amber-cli/cli/support/amber-cli.js file has windows \r/n line feeds, and OSX env cannot handle that (it thinks \r is part of the command name).
>
> The fix (that I think will work on nodejs for Win as well) will be to use unix encoded files only.
>
> I want to write a command line automated test that fails when any built files contain \r\n, convert the files, and submit a pull request.

>
> There is no info on docs.amber-lang.net or https://github.com/amber-smalltalk/amber/wiki on how to create these tests.
>
>
> Would anyone walk me through the process?
>
> best,
> Siemen
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: creating a test & patch

Siemen Baader

On 07 May 2014, at 14:54, Herby Vojčík <[hidden email]> wrote:

> Ah, sorry.
>
> I probably forgot and ran npm publish from Windows.
> I'm going to fix this by unpublishing the last version and publishing it under UNIX.
>
> (git for windows does autocovert in both directions, so everything's ok unless I npm publish the windows state)
>
> Herby

Cool, thanks! It's not a big problem for me either, I just converted the file.

Would having an automated test for it be good, in case it slips again? Also, I'd like to learn how to set this up and put it on the wiki.

-- Siemen

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: creating a test & patch

Herby Vojčík
Well, unpublishing was not necessary, as republishing the same version is prohibited, but published 0.0.10 from UNIX.

Siemen Baader wrote:

> On 07 May 2014, at 14:54, Herby Vojčík<[hidden email]>  wrote:
>
>> Ah, sorry.
>>
>> I probably forgot and ran npm publish from Windows.
>> I'm going to fix this by unpublishing the last version and publishing it under UNIX.
>>
>> (git for windows does autocovert in both directions, so everything's ok unless I npm publish the windows state)
>>
>> Herby
>
> Cool, thanks! It's not a big problem for me either, I just converted the file.
>
> Would having an automated test for it be good, in case it slips again? Also, I'd like to learn how to set this up and put it on the wiki.
>
> -- Siemen
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: creating a test & patch

sebastianconcept
In reply to this post by Siemen Baader

On May 7, 2014, at 10:00 AM, Siemen Baader <[hidden email]> wrote:

Would having an automated test for it be good, in case it slips again? Also, I'd like to learn how to set this up and put it on the wiki.

+1

This problem erodes credibility from the start and by a mile

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: creating a test & patch

Tim Mackinnon
In reply to this post by Siemen Baader
Anything automated the helps detect errors when people are time constrained/in a hurry seems to make sense … I think it would be a good idea to try, and possibly pave the way to even more automation.


On 7 May 2014, at 14:00, Siemen Baader <[hidden email]> wrote:

>
> On 07 May 2014, at 14:54, Herby Vojčík <[hidden email]> wrote:
>
>> Ah, sorry.
>>
>> I probably forgot and ran npm publish from Windows.
>> I'm going to fix this by unpublishing the last version and publishing it under UNIX.
>>
>> (git for windows does autocovert in both directions, so everything's ok unless I npm publish the windows state)
>>
>> Herby
>
> Cool, thanks! It's not a big problem for me either, I just converted the file.
>
> Would having an automated test for it be good, in case it slips again? Also, I'd like to learn how to set this up and put it on the wiki.
>
> -- Siemen
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: creating a test & patch

Herby Vojčík
In reply to this post by Siemen Baader


Siemen Baader wrote:

> On 07 May 2014, at 14:54, Herby Vojčík<[hidden email]>  wrote:
>
>> Ah, sorry.
>>
>> I probably forgot and ran npm publish from Windows.
>> I'm going to fix this by unpublishing the last version and publishing it under UNIX.
>>
>> (git for windows does autocovert in both directions, so everything's ok unless I npm publish the windows state)
>>
>> Herby
>
> Cool, thanks! It's not a big problem for me either, I just converted the file.
>
> Would having an automated test for it be good, in case it slips again? Also, I'd like to learn how to set this up and put it on the wiki.

Well, a smoke test for amber-cli shouldn't be that hard... just tell
travis to install it globally from npm, and just run "amber version", or
"amber -h" or so ("amber init" is harder to test as it is interactive).

> -- Siemen

Herby

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: creating a test & patch

Siemen Baader

On 07 May 2014, at 15:22, Herby Vojčík <[hidden email]> wrote:
>
> Well, a smoke test for amber-cli shouldn't be that hard... just tell travis to install it globally from npm, and just run "amber version", or "amber -h" or so ("amber init" is harder to test as it is interactive).

hm.. is travis another dependency tool that is part of the amber distribution? I would like to just create a SUnit test that is run from the command line and uses nodejs' file API to read the js files and checks for occurences of \r\n.

Where do I start?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: creating a test & patch

Herby Vojčík
Oh, this way... Well, you can do it as well...

What's hard on this is this is cli-only (that is, node-only) which prohibits running it from SUnit Runner in legacy IDE.

Well, just create SUnit Test class and update amberc:test_runner in gruntfile to include it in the cli runner. But it would probably be best to put it in different package, so it can be easily removed in SUnit Runner.

Herby

Siemen Baader wrote:
> On 07 May 2014, at 15:22, Herby Vojčík<[hidden email]>  wrote:
>> Well, a smoke test for amber-cli shouldn't be that hard... just tell travis to install it globally from npm, and just run "amber version", or "amber -h" or so ("amber init" is harder to test as it is interactive).
>
> hm.. is travis another dependency tool that is part of the amber distribution? I would like to just create a SUnit test that is run from the command line and uses nodejs' file API to read the js files and checks for occurences of \r\n.
>
> Where do I start?
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.