Contributing with tests

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

Re: Contributing with tests

Herby Vojčík
Best way to get working code is to simply create an amber project per instruction on amber's README page: installing amber-cli, running amber init, and look into src folder. Not to mention that with working amber you can add the code you like into the package from IDE itself, and then use it as input inro the functional tests.

Maybe the problem is you are too focused in edit-compile-run cycle? Smalltalk was always more than a language - it was the whole environment. So trying to 'write .st source code first' is very unusual way to code in Smalltalk. The Smalltalk way is 'run it, change it, save it'. The cli tool is there for automation, and it needs tests,  but it is not the main way which is used in Smalltalk development; the main way is IDE inspecting the live project.

Herby

Célia Cacciatore wrote:
> As we don't know Smalltalk (we had to choose a language we didn't
> know), we tried with an example found on internet.
> Our goal is to write a functional test on amberc,
so we just wanted a

> .st file to compile in command line, that's why we just tried to find
> a .st file on the internet.
> We still can't launch an Amber project currently. We compiled the
> hello example in amber-examples, but it didn't work in the browser
> (the button 'sayhello' does nothing), even when we added the script in
> index.html.
> We're looking for a simple example to try.
>
> Thanks.
>
> Celia, Jonathan, Quentin, Romain
>
>
>
>
> Le mercredi 24 septembre 2014 16:28:27 UTC+2, nicolas petton a écrit :
>
>     Hi,
>
>     The Amber chunk format is not exactly the same as the Pharo or GST
>     one,
>     and the language itself has some important differences:
>
>     https://github.com/amber-smalltalk/amber/wiki/Porting-code-from-other-Smalltalk-dialects
>     <https://github.com/amber-smalltalk/amber/wiki/Porting-code-from-other-Smalltalk-dialects>
>
>
>     But anyway, why aren't you using the builtin IDE instead of
>     editing .st
>     files manually?

>
>     Cheers,
>     Nico
>
>
>     Célia Cacciatore <[hidden email] <javascript:>> writes:
>
>     > Okay.
>     >
>     > We found an hello example on amber-examples
>     >
>     <https://github.com/amber-smalltalk/amber-examples/tree/master/hello
>     <https://github.com/amber-smalltalk/amber-examples/tree/master/hello>>
>     but
>     > we couldn't launch them with gst nor use the compiled js with node.
>     > Could you give us some examples which work and how to use them
>     please ?
>     >
>     > We also tried to write a smalltalk file which works with gst,
>     but which
>     > can't be compiled with amberc. Is there a problem with the
>     compiler ? Does
>     > it work only with a specific syntax of smalltalk ?
>     > We joined the file so you can look at it.
>     >
>     > Thank you.
>     >
>     > Celia, Jonathan, Quentin, Romain
>
>     --
>     Nicolas Petton
>     http://nicolas-petton.fr
>
> --
> 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]
> <mailto:[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: Contributing with tests

Herby Vojčík


Herby Vojčík wrote:
> Maybe the problem is you are too focused in edit-compile-run cycle?
> Smalltalk was always more than a language - it was the whole
> environment. So trying to 'write .st source code first' is very unusual
> way to code in Smalltalk. The Smalltalk way is 'run it, change it, save
> it'. The cli tool is there for automation, and it needs tests, but it is
> not the main way which is used in Smalltalk development; the main way is
> IDE inspecting the live project.

As for gst, which is source code based, it is an exception. Other
Smalltalks follow the previous paradigm.

> 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: Contributing with tests

Hannes Hirzel
In reply to this post by Célia Cacciatore
On 9/24/14, Célia Cacciatore <[hidden email]> wrote:
> As we don't know Smalltalk (we had to choose a language we didn't know), we
>
> tried with an example found on internet.
> Our goal is to write a functional test on amberc, so we just wanted a .st
> file to compile in command line, that's why we just tried to find a .st
> file on the internet.
> We still can't launch an Amber project currently. We compiled the hello
> example in amber-examples, but it didn't work in the browser (the button
> 'sayhello' does nothing),

I just retested amber-examples two hours ago. The 'sayhello' button worked fine.

Please follow the instructions here

https://github.com/amber-smalltalk/amber-examples/blob/master/README.md

and tell us exactly where you encounter problems.

It the button does not work open the web console (e.g. Firefox 'Web
Developer Tools') and send a copy of the error messages which should
be there if it does not work.

HTH
--Hannes

 even when we added the script in index.html.

> We're looking for a simple example to try.
>
> Thanks.
>
> Celia, Jonathan, Quentin, Romain
>
>
>
>
> Le mercredi 24 septembre 2014 16:28:27 UTC+2, nicolas petton a écrit :
>>
>> Hi,
>>
>> The Amber chunk format is not exactly the same as the Pharo or GST one,
>> and the language itself has some important differences:
>>
>>
>> https://github.com/amber-smalltalk/amber/wiki/Porting-code-from-other-Smalltalk-dialects
>>
>>
>> But anyway, why aren't you using the builtin IDE instead of editing .st
>> files manually?
>>
>> Cheers,
>> Nico
>>
>>
>> Célia Cacciatore <[hidden email] <javascript:>> writes:
>>
>> > Okay.
>> >
>> > We found an hello example on amber-examples
>> > <https://github.com/amber-smalltalk/amber-examples/tree/master/hello>
>> but
>> > we couldn't launch them with gst nor use the compiled js with node.
>> > Could you give us some examples which work and how to use them please ?
>> >
>> >
>> > We also tried to write a smalltalk file which works with gst, but which
>> >
>> > can't be compiled with amberc. Is there a problem with the compiler ?
>> Does
>> > it work only with a specific syntax of smalltalk ?
>> > We joined the file so you can look at it.
>> >
>> > Thank you.
>> >
>> > Celia, Jonathan, Quentin, Romain
>>
>> --
>> Nicolas Petton
>> http://nicolas-petton.fr
>>
>>
>
> --
> 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: Contributing with tests

Hannes Hirzel
What do you get after

     amber version

on the command line?

On 9/24/14, H. Hirzel <[hidden email]> wrote:

> On 9/24/14, Célia Cacciatore <[hidden email]> wrote:
>> As we don't know Smalltalk (we had to choose a language we didn't know),
>> we
>>
>> tried with an example found on internet.
>> Our goal is to write a functional test on amberc, so we just wanted a .st
>> file to compile in command line, that's why we just tried to find a .st
>> file on the internet.
>> We still can't launch an Amber project currently. We compiled the hello
>> example in amber-examples, but it didn't work in the browser (the button
>> 'sayhello' does nothing),
>
> I just retested amber-examples two hours ago. The 'sayhello' button worked
> fine.
>
> Please follow the instructions here
>
> https://github.com/amber-smalltalk/amber-examples/blob/master/README.md
>
> and tell us exactly where you encounter problems.
>
> It the button does not work open the web console (e.g. Firefox 'Web
> Developer Tools') and send a copy of the error messages which should
> be there if it does not work.
>
> HTH
> --Hannes
>
>  even when we added the script in index.html.
>> We're looking for a simple example to try.
>>
>> Thanks.
>>
>> Celia, Jonathan, Quentin, Romain
>>
>>
>>
>>
>> Le mercredi 24 septembre 2014 16:28:27 UTC+2, nicolas petton a écrit :
>>>
>>> Hi,
>>>
>>> The Amber chunk format is not exactly the same as the Pharo or GST one,
>>> and the language itself has some important differences:
>>>
>>>
>>> https://github.com/amber-smalltalk/amber/wiki/Porting-code-from-other-Smalltalk-dialects
>>>
>>>
>>> But anyway, why aren't you using the builtin IDE instead of editing .st
>>> files manually?
>>>
>>> Cheers,
>>> Nico
>>>
>>>
>>> Célia Cacciatore <[hidden email] <javascript:>> writes:
>>>
>>> > Okay.
>>> >
>>> > We found an hello example on amber-examples
>>> > <https://github.com/amber-smalltalk/amber-examples/tree/master/hello>
>>> but
>>> > we couldn't launch them with gst nor use the compiled js with node.
>>> > Could you give us some examples which work and how to use them please
>>> > ?
>>> >
>>> >
>>> > We also tried to write a smalltalk file which works with gst, but
>>> > which
>>> >
>>> > can't be compiled with amberc. Is there a problem with the compiler ?
>>> Does
>>> > it work only with a specific syntax of smalltalk ?
>>> > We joined the file so you can look at it.
>>> >
>>> > Thank you.
>>> >
>>> > Celia, Jonathan, Quentin, Romain
>>>
>>> --
>>> Nicolas Petton
>>> http://nicolas-petton.fr
>>>
>>>
>>
>> --
>> 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: Contributing with tests

Hannes Hirzel
Hello Celia and others

May I ask you to test the project 'amber-examples' in a new directory
following a reworked version of the amber-examples README

https://github.com/hhzl/amber-examples/blob/master/README.md

Thank you

--Hannes

On 9/24/14, H. Hirzel <[hidden email]> wrote:

> What do you get after
>
>      amber version
>
> on the command line?
>
> On 9/24/14, H. Hirzel <[hidden email]> wrote:
>> On 9/24/14, Célia Cacciatore <[hidden email]> wrote:
>>> As we don't know Smalltalk (we had to choose a language we didn't know),
>>> we
>>>
>>> tried with an example found on internet.
>>> Our goal is to write a functional test on amberc, so we just wanted a
>>> .st
>>> file to compile in command line, that's why we just tried to find a .st
>>> file on the internet.
>>> We still can't launch an Amber project currently. We compiled the hello
>>> example in amber-examples, but it didn't work in the browser (the button
>>> 'sayhello' does nothing),
>>
>> I just retested amber-examples two hours ago. The 'sayhello' button
>> worked
>> fine.
>>
>> Please follow the instructions here
>>
>> https://github.com/amber-smalltalk/amber-examples/blob/master/README.md
>>
>> and tell us exactly where you encounter problems.
>>
>> It the button does not work open the web console (e.g. Firefox 'Web
>> Developer Tools') and send a copy of the error messages which should
>> be there if it does not work.
>>
>> HTH
>> --Hannes
>>
>>  even when we added the script in index.html.
>>> We're looking for a simple example to try.
>>>
>>> Thanks.
>>>
>>> Celia, Jonathan, Quentin, Romain
>>>
>>>
>>>
>>>
>>> Le mercredi 24 septembre 2014 16:28:27 UTC+2, nicolas petton a écrit :
>>>>
>>>> Hi,
>>>>
>>>> The Amber chunk format is not exactly the same as the Pharo or GST one,
>>>> and the language itself has some important differences:
>>>>
>>>>
>>>> https://github.com/amber-smalltalk/amber/wiki/Porting-code-from-other-Smalltalk-dialects
>>>>
>>>>
>>>> But anyway, why aren't you using the builtin IDE instead of editing .st
>>>> files manually?
>>>>
>>>> Cheers,
>>>> Nico
>>>>
>>>>
>>>> Célia Cacciatore <[hidden email] <javascript:>> writes:
>>>>
>>>> > Okay.
>>>> >
>>>> > We found an hello example on amber-examples
>>>> > <https://github.com/amber-smalltalk/amber-examples/tree/master/hello>
>>>> but
>>>> > we couldn't launch them with gst nor use the compiled js with node.
>>>> > Could you give us some examples which work and how to use them please
>>>> > ?
>>>> >
>>>> >
>>>> > We also tried to write a smalltalk file which works with gst, but
>>>> > which
>>>> >
>>>> > can't be compiled with amberc. Is there a problem with the compiler ?
>>>> Does
>>>> > it work only with a specific syntax of smalltalk ?
>>>> > We joined the file so you can look at it.
>>>> >
>>>> > Thank you.
>>>> >
>>>> > Celia, Jonathan, Quentin, Romain
>>>>
>>>> --
>>>> Nicolas Petton
>>>> http://nicolas-petton.fr
>>>>
>>>>
>>>
>>> --
>>> 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: Contributing with tests

Hannes Hirzel
In reply to this post by Célia Cacciatore
On 9/24/14, Célia Cacciatore <[hidden email]> wrote:
> Okay.
>
> We found an hello example on amber-examples
> <https://github.com/amber-smalltalk/amber-examples/tree/master/hello> but
> we couldn't launch them with gst nor use the compiled js with node.

The hello example you mention is for the browser.
https://github.com/amber-smalltalk/amber-examples/blob/master/hello/st/HelloApp.st

Smalltalk createPackage: 'HelloApp'!
Object subclass: #Hello
instanceVariableNames: ''
package: 'HelloApp'!
!Hello methodsFor: 'not yet classified'!
begin
"Makes me say hello to the user."
| msg button |
msg := 'Hello world!!'.
button := '#sayHello' asJQuery.
button click: [button after: '<p>' , msg , '</p>'].
! !

If you follow the setup instructions ending with

     amber serve

and pointing your browser to localhost:4000

It should work for you as well.  My retest yesterday was successful.

Please test ......if not ask please give feedback so that we can find out why.

> Could you give us some examples which work and how to use them please ?

There is a command line hello example
https://github.com/amber-smalltalk/amber-examples/tree/master/nodejs

You execute it as follows

# original set of files in hello directory
hhzl@hhzl-Latitude-E6400 ~/test1/amber-examples/nodejs/hello $ ls
hello  hello.bat  Hello.st

# change to nodejs directory
hhzl@hhzl-Latitude-E6400 ~/test1/amber-examples/nodejs/hello $ cd ..


# run the grunt task called amberc:hello which builds the hello world program
hhzl@hhzl-Latitude-E6400 ~/test1/amber-examples/nodejs $ grunt amberc:hello
Running "amberc:hello" (amberc) task
Reading: hello/Hello.st
Writing program file: hello/Program.js

Done, without errors.

# change the working directory to hello
hhzl@hhzl-Latitude-E6400 ~/test1/amber-examples/nodejs $ cd hello

# list the files to see what has been generated
hhzl@hhzl-Latitude-E6400 ~/test1/amber-examples/nodejs/hello $ ls
hello  hello.bat  Hello.js  Hello.st  Program.js

# execute the hello program
hhzl@hhzl-Latitude-E6400 ~/test1/amber-examples/nodejs/hello $ ./hello
Hello world from Amber in Node.js

See also
http://docs.amber-lang.net/js-glossary.html

If you need more explanations or links there please ask as well.

> We also tried to write a smalltalk file which works with gst, but which
> can't be compiled with amberc. Is there a problem with the compiler ? Does
> it work only with a specific syntax of smalltalk ?
> We joined the file so you can look at it.
>
> Thank you.
>
> Celia, Jonathan, Quentin, Romain
>
> --
> 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: Contributing with tests

Jonathan Geoffroy
Hello,
Thank for all answers.
The problem was the bower module installation (we doesn't have su rights here, so we can't install modules by using --globals). But anyway, HelloApp example works for us now!

Just to be sure, issue #994 can be tested by:
  1. running amber init to create a new project,
  2. running amber serve in this new project,
  3. verify using phantom that the amber IDE can be opened,
  4. Add some code and run it, or run amber test suite.
Is the better way write this test in smalltalk and run it in amber IDE?

Thank you,
Jonathan, Celia, Quentin, Romain

--
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: Contributing with tests

Hannes Hirzel
On 9/25/14, Jonathan Geoffroy <[hidden email]> wrote:
> Hello,
> Thank for all answers.

You are welcome.

> The problem was the bower module installation (we doesn't have *su* rights
> here, so we can't install modules by using --globals). But anyway, HelloApp
>
> example works for us now!

I added your (user) test result here

https://github.com/amber-smalltalk/amber-examples/issues/50#issuecomment-56796625

--Hannes

> Just to be sure, issue #994 can be tested by:
>
>    1. running amber init to create a new project,
>    2. running amber serve in this new project,
>    3. verify using phantom that the amber IDE can be opened,
>    4. Add some code and run it, or run amber test suite.
>
> Is the better way write this test in smalltalk and run it in amber IDE?

I suggest that you open a github account if you have not already done
so and post this question here
https://github.com/amber-smalltalk/amber/issues/994

--Hannes

> Thank you,
> Jonathan, Celia, Quentin, Romain
>
> --
> 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: Contributing with tests

Jonathan Geoffroy
In reply to this post by Célia Cacciatore
We came on IRC to ask a question, but as we had to leave before we got the answer, we'll ask here :

Hi, we have a question about amber-init : We tried to generate a default init project with amber using a bash script with default input stored inside a text file
We also tried this technique : printf "%s\n" "value1" "value2" "value3" | amber init
The problem is that only the first value (example : value1) was considered by amber init
How does amber init read inputs ? Does it use stdin ?

Thank you,

Jonathan, Celia, Romain, Quentin

--
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: Contributing with tests

Herby Vojčík
It's complicated chain, it uses stdin in amber itself, but passes that in to child process grunt-init which it calls to actually perform initialization step (then it does a few more things). The code is in Amber itself, in AmberCli package, Initer class.

How to pass this beast a fake input is a good question ;-)

If simple redirection does not help, you maybe need to employ some workarounds. There may be some projects around which wait for specific output and inject input just-in-time, or you may fake it yourself with just using pipe and sleep or so... maybe someone can help who solved this specific problem, otherwise, google and keep trying (alternatively, propose change to AmberCli itself which make it friendlier to such input; but I fear amber cli does it fine and grunt-init is one who eats the input, so you must do it in some "wait for prompt, inject answer" loop).

Jonathan Geoffroy wrote:
> We came on IRC to ask a question, but as we had to leave before we got
> the a
nswer, we'll ask here :

>
> Hi, we have a question about amber-init : We tried to generate a
> default init project with amber using a bash script with default input
> stored inside a text file
> We also tried this technique : printf "%s\n" "value1" "value2"
> "value3" | amber init
> The problem is that only the first value (example : value1) was
> considered by amber init
> How does amber init read inputs ? Does it use stdin ?
>
> Thank you,
>
> Jonathan, Celia, Romain, Quentin
>
> --
> 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]
> <mailto:[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: Contributing with tests

Herby Vojčík
In reply to this post by Jonathan Geoffroy
Hi!

I just pushed (and published to npm) a version of cli that launches
subprocesses in different manner (child_process.fork instead of
child_process.exec). As such, it inherites stdin and stdout from its
parent, directly. Maybe that also means, you can simply use redirection
to test amber init now.

Herby

Jonathan Geoffroy wrote:

> We came on IRC to ask a question, but as we had to leave before we got
> the answer, we'll ask here :
>
> Hi, we have a question about amber-init : We tried to generate a default
> init project with amber using a bash script with default input stored
> inside a text file
> We also tried this technique : printf "%s\n" "value1" "value2" "value3"
> | amber init
> The problem is that only the first value (example : value1) was
> considered by amber init
> How does amber init read inputs ? Does it use stdin ?
>
> Thank you,
>
> Jonathan, Celia, Romain, Quentin
>
> --
> 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]
> <mailto:[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: Contributing with tests

Hannes Hirzel
Here

https://github.com/amber-smalltalk/amber/issues/1085#issuecomment-58012146

is such a test done manually.



On 10/5/14, Herby Vojčík <[hidden email]> wrote:

> Hi!
>
> I just pushed (and published to npm) a version of cli that launches
> subprocesses in different manner (child_process.fork instead of
> child_process.exec). As such, it inherites stdin and stdout from its
> parent, directly. Maybe that also means, you can simply use redirection
> to test amber init now.
>
> Herby
>
> Jonathan Geoffroy wrote:
>> We came on IRC to ask a question, but as we had to leave before we got
>> the answer, we'll ask here :
>>
>> Hi, we have a question about amber-init : We tried to generate a default
>> init project with amber using a bash script with default input stored
>> inside a text file
>> We also tried this technique : printf "%s\n" "value1" "value2" "value3"
>> | amber init
>> The problem is that only the first value (example : value1) was
>> considered by amber init
>> How does amber init read inputs ? Does it use stdin ?
>>
>> Thank you,
>>
>> Jonathan, Celia, Romain, Quentin
>>
>> --
>> 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]
>> <mailto:[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.
>

--
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: Contributing with tests

Jonathan Geoffroy
In reply to this post by Herby Vojčík
Hello,
You said that you published a new version of cli. Does it mean that I just have to uninstall and re install amber-cli to have this version?
I've just tried:

    sudo npm uninstall -g amber-cli bower grunt-cli
    sudo npm install -g amber-cli bower grunt-cli
    cd /path/to/an/empty/directory
    amber init < ../responses # (where responses file contains responses to provide to amber init, line by line)

But unfortunately, shell's redirection doesn't work... amber init is still stopped at the second question.

Jonathan

--
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: Contributing with tests

Herby Vojčík
In reply to this post by Célia Cacciatore


Jonathan Geoffroy <[hidden email]>napísal/a:

Hello,
You said that you published a new version of cli. Does it mean that I just have to uninstall and re install amber-cli to have this version?
I've just tried:

    sudo npm uninstall -g amber-cli bower grunt-cli
    sudo npm install -g amber-cli bower grunt-cli

This installs the stable version, to install bleeding-edge one you need to write amber-cli@bleedingedge into the command.

    cd /path/to/an/empty/directory
    amber init < ../responses # (where responses file contains responses to provide to amber init, line by line)

But unfortunately, shell's redirection doesn't work... amber init is still stopped at the second question.

Jonathan

--
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: Contributing with tests

Herby Vojčík
In reply to this post by Célia Cacciatore


Jonathan Geoffroy <[hidden email]>napísal/a:

Hello,
You said that you published a new version of cli. Does it mean that I just have to uninstall and re install amber-cli to have this version?
I've just tried:

    sudo npm uninstall -g amber-cli bower grunt-cli
    sudo npm install -g amber-cli bower grunt-cli

Also, if you write tests on cli package, you should not install it from npm. npm only contains version which are specifically uploaded there, but tests need to be able to test the actual version from git.

That is, instead of actially running global command 'amber' with parameter init, you should call the version that is in tbe gir repository. You can employ two approaches (let's assume you have the git repo cloned already in amber-repo):

1. Call the command directly as is, that is
  cd empty-dir
  node amber-repo/external/amber-cli/support/amber-cli.js init

(I suppose you already know amber-cli is in external/amber-cli and the rest of path ia defined in package.json in bin section)

2. You actually install local version via npm (this test also correct npm settings etc.), that is (assuming you have helper-dir where you already ran 'npm init'):
  cd helper-dir
  npm install amber-repo/external/amber-cli
  cd empty-dir
  helper-dir/node_modules/.bin/amber init

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: Contributing with tests

Célia Cacciatore
Hello,

We've made a bash script to test if amber version works correctly. We checked if the displayed version equals the one in external/amber/package.json. We also checked the node version.
Where in the project should we put our test so that we can make a pull request ?

We're still working on the other tests.

Thank you.
Celia, Jonathan, Quentin, Romain

--
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: Contributing with tests

Herby Vojčík
In reply to this post by Célia Cacciatore
Into external/amber-cli/tests, I would say.

Célia Cacciatore <[hidden email]>napísal/a:

Hello,

We've made a bash script to test if amber version works correctly. We checked if the displayed version equals the one in external/amber/package.json. We also checked the node version.
Where in the project should we put our test so that we can make a pull request ?

We're still working on the other tests.

Thank you.
Celia, Jonathan, Quentin, Romain

--
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: Contributing with tests

Célia Cacciatore
Thanks. We made the pull request.
Don't hesitate to tell us if it's okay or not.

We continue working on the other tests.

Celia, Jonathan, Quentin, Romain



Le lundi 13 octobre 2014 16:43:28 UTC+2, Herby a écrit :
Into external/amber-cli/tests, I would say.

Célia Cacciatore <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3Ms3OUSXD-QJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">celia.ca...@...>napísal/a:

Hello,

We've made a bash script to test if amber version works correctly. We checked if the displayed version equals the one in external/amber/package.json. We also checked the node version.
Where in the project should we put our test so that we can make a pull request ?

We're still working on the other tests.

Thank you.
Celia, Jonathan, Quentin, Romain

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3Ms3OUSXD-QJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">amber-lang+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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: Contributing with tests

Jonathan Geoffroy
In reply to this post by Herby Vojčík
Hello,

We are testing amberc, but when we run the js version of the command, we got this error:
 
$ node ./amberc-cli.js

module.js:340
   throw err;
         ^
Error: Cannot find module 'amber-dev/lib/amberc'
   at Function.Module._resolveFilename (module.js:338:15)
   at Function.Module._load (module.js:280:25)
   at Module.require (module.js:364:17)
   at require (module.js:380:17)
   at Object.<anonymous> (/gfs/geoffroy/progra/newamber/amber/external/amber-cli/support/amberc-cli.js:4:14)
   at Module._compile (module.js:456:26)
   at Object.Module._extensions..js (module.js:474:10)
   at Module.load (module.js:356:32)
   at Function.Module._load (module.js:312:12)
   at Function.Module.runMain (module.js:497:10)

How can we run the amberc command in bash test? Can we just call the `amberc` bash command?

Célia, Jonathan, Quentin, Romain

--
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: Contributing with tests

Herby Vojčík


Jonathan Geoffroy wrote:

> Hello,
>
> We are testing amberc, but when we run the js version of the command,
> we got this error:
> ||
> $node ./amberc-cli.js
>
> module.js:340
> throwerr;
> ^
> Error:Cannotfind module'amber-dev/lib/amberc'

Well, you probably did not install npm dependencies.

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.
123