Matt Wynne | 25 Jan 07:40 2013
Picon

Re: [Cucumber] Lexing error when I try to execute an test written in spanish

Hi Juan,

On 24 Jan 2013, at 17:30, Juan Manuel Bertoni <jm.bertoni-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

Hi everyone!

I'm from Argentina. I'm trying to learn how to use and do my tests using Cucumber.

Welcome!

I wrote a few examples of The Cucumber Book to try&learn. Right now I'm trying to execute them using the spanish keywords but when I run them I get the following message in the command line:


C:\Ruby\cajero automatico>cucumber
features/extraccion_dinero.feature: Lexing error on line 2: 'Caracter��stica: Extracci��n de dinero'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information. (Gherkin::Lexer::LexingError)
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/lexer/i18n_lexer.rb:22:in `scan'
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/lexer/i18n_lexer.rb:22:in `scan'
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/parser/parser.rb:32:in `parse'
......

If I write the examples in english then I don't have any problem, so I deduced there is a problem with the spanish keywords or something that I forgot. 

To write my test I use Notepad++. I have installed ruby 1.9..3p327 and cucumber 1.2.1. 
Attached to this message I put the examples to help you help me.

Thanks in advance!
Juan.

-----

Feature: 

# encoding: utf-8
Feature: Extracción de dinero
Scenario: Retiro exitoso de dinero de una cuenta 
Given que tengo depositados $ 100 en mi cuenta
When solicito $ 20
Then deben expenderse $ 20

Could you save the actual Feature file somewhere we can access it? A Github gist would work well.

That way we can reproduce the problem.

Could you also try saving the file with a different editor, to see if that makes any difference? We have had trouble like this before with Windows editors.


Steps:

Given /^que tengo depositados \$ (\d+) en mi cuenta$/ do |cantidad|
Account.new (amount.to_i)
end 
When /^solicito \$ (\d+)$/ do | cantidad|
pending ("¿Cómo simulamos la solicitud de dinero?")
end
Then /^deben expenderse \$ (\d+)$/ do |cantidad|
pending ("¿Cómo validamos que el dinero fue expendido?")
end 


--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. To unsubscribe from this group, send email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
 
 


--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
 
 

Juan Manuel Bertoni | 25 Jan 16:42 2013
Picon

Re: [Cucumber] Lexing error when I try to execute an test written in spanish

Matt, thanks for your answer.

Effectively was the editor. I started to use an editor called SciTE and it works fine.

El viernes, 25 de enero de 2013 03:40:25 UTC-3, Matt Wynne escribió:
Hi Juan,

On 24 Jan 2013, at 17:30, Juan Manuel Bertoni <jm.be...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

Hi everyone!

I'm from Argentina. I'm trying to learn how to use and do my tests using Cucumber.

Welcome!

I wrote a few examples of The Cucumber Book to try&learn. Right now I'm trying to execute them using the spanish keywords but when I run them I get the following message in the command line:


C:\Ruby\cajero automatico>cucumber
features/extraccion_dinero.feature: Lexing error on line 2: 'Caracter��stica: Extracci��n de dinero'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information. (Gherkin::Lexer::LexingError)
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/lexer/i18n_lexer.rb:22:in `scan'
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/lexer/i18n_lexer.rb:22:in `scan'
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/parser/parser.rb:32:in `parse'
......

If I write the examples in english then I don't have any problem, so I deduced there is a problem with the spanish keywords or something that I forgot. 

To write my test I use Notepad++. I have installed ruby 1.9..3p327 and cucumber 1.2.1. 
Attached to this message I put the examples to help you help me.

Thanks in advance!
Juan.

-----

Feature: 

# encoding: utf-8
Feature: Extracción de dinero
Scenario: Retiro exitoso de dinero de una cuenta 
Given que tengo depositados $ 100 en mi cuenta
When solicito $ 20
Then deben expenderse $ 20

Could you save the actual Feature file somewhere we can access it? A Github gist would work well.

That way we can reproduce the problem.

Could you also try saving the file with a different editor, to see if that makes any difference? We have had trouble like this before with Windows editors.


Steps:

Given /^que tengo depositados \$ (\d+) en mi cuenta$/ do |cantidad|
Account.new (amount.to_i)
end 
When /^solicito \$ (\d+)$/ do | cantidad|
pending ("¿Cómo simulamos la solicitud de dinero?")
end
Then /^deben expenderse \$ (\d+)$/ do |cantidad|
pending ("¿Cómo validamos que el dinero fue expendido?")
end 


--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu... <at> googlegroups.com. To unsubscribe from this group, send email to cukes+un... <at> googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
 
 


--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
 
 
Javix | 28 Jan 16:28 2013
Picon

Re: [Cucumber] Lexing error when I try to execute an test written in spanish

I had the same issues with Windows terminal (as I see, it's your case) on a French PC.
- Hit 'cmd' to enter the terminal window
- tape in chcp 1252 to change encoding table of the terminal.

In your case the chcp code might be different, so google a little bit and fins CHSP codes for Spanish to use on Windows.

On Friday, January 25, 2013 4:42:21 PM UTC+1, Juan Manuel Bertoni wrote:

Matt, thanks for your answer.
Effectively was the editor. I started to use an editor called SciTE and it works fine.

El viernes, 25 de enero de 2013 03:40:25 UTC-3, Matt Wynne escribió:
Hi Juan,

On 24 Jan 2013, at 17:30, Juan Manuel Bertoni <jm.be...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

Hi everyone!

I'm from Argentina. I'm trying to learn how to use and do my tests using Cucumber.

Welcome!

I wrote a few examples of The Cucumber Book to try&learn. Right now I'm trying to execute them using the spanish keywords but when I run them I get the following message in the command line:


C:\Ruby\cajero automatico>cucumber
features/extraccion_dinero.feature: Lexing error on line 2: 'Caracter��stica: Extracci��n de dinero'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information. (Gherkin::Lexer::LexingError)
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/lexer/i18n_lexer.rb:22:in `scan'
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/lexer/i18n_lexer.rb:22:in `scan'
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/parser/parser.rb:32:in `parse'
......

If I write the examples in english then I don't have any problem, so I deduced there is a problem with the spanish keywords or something that I forgot. 

To write my test I use Notepad++. I have installed ruby 1.9..3p327 and cucumber 1.2.1. 
Attached to this message I put the examples to help you help me.

Thanks in advance!
Juan.

-----

Feature: 

# encoding: utf-8
Feature: Extracción de dinero
Scenario: Retiro exitoso de dinero de una cuenta 
Given que tengo depositados $ 100 en mi cuenta
When solicito $ 20
Then deben expenderse $ 20

Could you save the actual Feature file somewhere we can access it? A Github gist would work well.

That way we can reproduce the problem.

Could you also try saving the file with a different editor, to see if that makes any difference? We have had trouble like this before with Windows editors.


Steps:

Given /^que tengo depositados \$ (\d+) en mi cuenta$/ do |cantidad|
Account.new (amount.to_i)
end 
When /^solicito \$ (\d+)$/ do | cantidad|
pending ("¿Cómo simulamos la solicitud de dinero?")
end
Then /^deben expenderse \$ (\d+)$/ do |cantidad|
pending ("¿Cómo validamos que el dinero fue expendido?")
end 


--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. To unsubscribe from this group, send email to cukes+un... <at> googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
 
 


--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Javix | 28 Jan 16:30 2013
Picon

Re: [Cucumber] Lexing error when I try to execute an test written in spanish

And don't forget to start your Spanish feature file with the following line:
# language: es

On Monday, January 28, 2013 4:28:37 PM UTC+1, Javix wrote:

I had the same issues with Windows terminal (as I see, it's your case) on a French PC.
- Hit 'cmd' to enter the terminal window
- tape in chcp 1252 to change encoding table of the terminal.

In your case the chcp code might be different, so google a little bit and fins CHSP codes for Spanish to use on Windows.

On Friday, January 25, 2013 4:42:21 PM UTC+1, Juan Manuel Bertoni wrote:
Matt, thanks for your answer.
Effectively was the editor. I started to use an editor called SciTE and it works fine.

El viernes, 25 de enero de 2013 03:40:25 UTC-3, Matt Wynne escribió:
Hi Juan,

On 24 Jan 2013, at 17:30, Juan Manuel Bertoni <jm.be...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

Hi everyone!

I'm from Argentina. I'm trying to learn how to use and do my tests using Cucumber.

Welcome!

I wrote a few examples of The Cucumber Book to try&learn. Right now I'm trying to execute them using the spanish keywords but when I run them I get the following message in the command line:


C:\Ruby\cajero automatico>cucumber
features/extraccion_dinero.feature: Lexing error on line 2: 'Caracter��stica: Extracci��n de dinero'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information. (Gherkin::Lexer::LexingError)
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/lexer/i18n_lexer.rb:22:in `scan'
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/lexer/i18n_lexer.rb:22:in `scan'
C:/Ruby/lib/ruby/gems/1.9.1/gems/gherkin-2.11.5-x86-mingw32/lib/gherkin/parser/parser.rb:32:in `parse'
......

If I write the examples in english then I don't have any problem, so I deduced there is a problem with the spanish keywords or something that I forgot. 

To write my test I use Notepad++. I have installed ruby 1.9..3p327 and cucumber 1.2.1. 
Attached to this message I put the examples to help you help me.

Thanks in advance!
Juan.

-----

Feature: 

# encoding: utf-8
Feature: Extracción de dinero
Scenario: Retiro exitoso de dinero de una cuenta 
Given que tengo depositados $ 100 en mi cuenta
When solicito $ 20
Then deben expenderse $ 20

Could you save the actual Feature file somewhere we can access it? A Github gist would work well.

That way we can reproduce the problem.

Could you also try saving the file with a different editor, to see if that makes any difference? We have had trouble like this before with Windows editors.


Steps:

Given /^que tengo depositados \$ (\d+) en mi cuenta$/ do |cantidad|
Account.new (amount.to_i)
end 
When /^solicito \$ (\d+)$/ do | cantidad|
pending ("¿Cómo simulamos la solicitud de dinero?")
end
Then /^deben expenderse \$ (\d+)$/ do |cantidad|
pending ("¿Cómo validamos que el dinero fue expendido?")
end 


--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. To unsubscribe from this group, send email to cukes+un... <at> googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
 
 


--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gmane