Juan Manuel Bertoni | 24 Jan 19:04 2013
Picon

[Cucumber] Lexing error when I try to run a test case written in spanish

Hi everyone!


I'm Juan,  from Argentina and this is my first time writing in this group.
I'm learning Cucumber to write my tests. I use "The Cucumber Book  Behavior-Driven...." to learn, practice and have some examples to write and see what it happen.
Yesterday, I tried to run some examples using the Spanish keywords but I had the following  message in the command line:

features/extraccion_dinero.feature: Lexing error on line 3: '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'
.....

I couldn't find what is the problem with the code, because only changing the Spanish for the English keywords, the test runs OK. According to the book if you put at the beginning of the feature's code #language: es, it would be possible to write in Spanish.  

I'm using ruby version 1.9.3p327, cucumber 1.2.1, and other gems according to the appendix 2 from the book. To write the features and steps I'm using Notepad++.

¿What can be happening? 

¡Thanks in advance for your answers!

Juan.

--------
Extra information:

Feature:

#language: es
# encoding: utf-8
Característica: Extracción de dinero
Escenario: Retiro exitoso de dinero de una cuenta 
Dado que tengo depositados $ 100 en mi cuenta
Cuando solicito $ 20
Entonces deben expenderse $ 20

Steps:

Dado /^que tengo depositados \$ (\d+) en mi cuenta$/ do |cantidad|
Account.new (amount.to_i)
end 
Cuando /^solicito \$ (\d+)$/ do | cantidad|
pending ("¿Cómo simulamos la solicitud de dinero?")
end
Entonces /^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-/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 | 24 Jan 18:30 2013
Picon

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

Hi everyone!

I'm from Argentina. I'm trying to learn how to use and do my tests using Cucumber. 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

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-/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
 
 
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.
 
 
Aslak Helles√ły | 24 Jan 19:11 2013
Picon

Re: [Cucumber] Lexing error when I try to run a test case written in spanish


On Thursday, 24 January 2013 at 18:04, Juan Manuel Bertoni wrote:

Hi everyone!

I'm Juan,  from Argentina and this is my first time writing in this group.
I'm learning Cucumber to write my tests. I use "The Cucumber Book  Behavior-Driven...." to learn, practice and have some examples to write and see what it happen.
Yesterday, I tried to run some examples using the Spanish keywords but I had the following  message in the command line:

features/extraccion_dinero.feature: Lexing error on line 3: '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'
.....

I couldn't find what is the problem with the code, because only changing the Spanish for the English keywords, the test runs OK. According to the book if you put at the beginning of the feature's code #language: es, it would be possible to write in Spanish.  

I'm using ruby version 1.9.3p327, cucumber 1.2.1, and other gems according to the appendix 2 from the book. To write the features and steps I'm using Notepad++.

¿What can be happening? 

You probably didn't save the file in UTF-8 encoding 
¡Thanks in advance for your answers!

Juan.

--------
Extra information:

Feature:

#language: es
# encoding: utf-8
Característica: Extracción de dinero
Escenario: Retiro exitoso de dinero de una cuenta 
Dado que tengo depositados $ 100 en mi cuenta
Cuando solicito $ 20
Entonces deben expenderse $ 20

Steps:

Dado /^que tengo depositados \$ (\d+) en mi cuenta$/ do |cantidad|
Account.new (amount.to_i)
end 
Cuando /^solicito \$ (\d+)$/ do | cantidad|
pending ("¿Cómo simulamos la solicitud de dinero?")
end
Entonces /^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-/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
 
 

--
-- 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 | 24 Jan 20:35 2013
Picon

Re: [Cucumber] Lexing error when I try to run a test case written in spanish

It seems like there's a problem with the encoding using the text editor recommend in the book (Notepad++). A friend of mine recommend me another editor, the SciTE and finally works fine!


Thank you!

El jueves, 24 de enero de 2013 15:11:48 UTC-3, Aslak Hellesøy escribió:

On Thursday, 24 January 2013 at 18:04, Juan Manuel Bertoni wrote:

Hi everyone!

I'm Juan,  from Argentina and this is my first time writing in this group.
I'm learning Cucumber to write my tests. I use "The Cucumber Book  Behavior-Driven...." to learn, practice and have some examples to write and see what it happen.
Yesterday, I tried to run some examples using the Spanish keywords but I had the following  message in the command line:

features/extraccion_dinero.feature: Lexing error on line 3: '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'
.....

I couldn't find what is the problem with the code, because only changing the Spanish for the English keywords, the test runs OK. According to the book if you put at the beginning of the feature's code #language: es, it would be possible to write in Spanish.  

I'm using ruby version 1.9.3p327, cucumber 1.2.1, and other gems according to the appendix 2 from the book. To write the features and steps I'm using Notepad++.

¿What can be happening? 

You probably didn't save the file in UTF-8 encoding 
¡Thanks in advance for your answers!

Juan.

--------
Extra information:

Feature:

#language: es
# encoding: utf-8
Característica: Extracción de dinero
Escenario: Retiro exitoso de dinero de una cuenta 
Dado que tengo depositados $ 100 en mi cuenta
Cuando solicito $ 20
Entonces deben expenderse $ 20

Steps:

Dado /^que tengo depositados \$ (\d+) en mi cuenta$/ do |cantidad|
Account.new (amount.to_i)
end 
Cuando /^solicito \$ (\d+)$/ do | cantidad|
pending ("¿Cómo simulamos la solicitud de dinero?")
end
Entonces /^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
 
 
aslak hellesoy | 24 Jan 21:09 2013
Picon

Re: [Cucumber] Lexing error when I try to run a test case written in spanish




On Thu, Jan 24, 2013 at 7:35 PM, Juan Manuel Bertoni <jm.bertoni <at> gmail.com> wrote:
It seems like there's a problem with the encoding using the text editor recommend in the book (Notepad++). A friend of mine recommend me another editor, the SciTE and finally works fine!


Glad you solved it. It's possible in Notepad++ too:
 
Thank you!

El jueves, 24 de enero de 2013 15:11:48 UTC-3, Aslak Hellesøy escribió:

On Thursday, 24 January 2013 at 18:04, Juan Manuel Bertoni wrote:

Hi everyone!

I'm Juan,  from Argentina and this is my first time writing in this group.
I'm learning Cucumber to write my tests. I use "The Cucumber Book  Behavior-Driven...." to learn, practice and have some examples to write and see what it happen.
Yesterday, I tried to run some examples using the Spanish keywords but I had the following  message in the command line:

features/extraccion_dinero.feature: Lexing error on line 3: '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'
.....

I couldn't find what is the problem with the code, because only changing the Spanish for the English keywords, the test runs OK. According to the book if you put at the beginning of the feature's code #language: es, it would be possible to write in Spanish.  

I'm using ruby version 1.9.3p327, cucumber 1.2.1, and other gems according to the appendix 2 from the book. To write the features and steps I'm using Notepad++.

¿What can be happening? 

You probably didn't save the file in UTF-8 encoding 
¡Thanks in advance for your answers!

Juan.

--------
Extra information:

Feature:

#language: es
# encoding: utf-8
Característica: Extracción de dinero
Escenario: Retiro exitoso de dinero de una cuenta 
Dado que tengo depositados $ 100 en mi cuenta
Cuando solicito $ 20
Entonces deben expenderse $ 20

Steps:

Dado /^que tengo depositados \$ (\d+) en mi cuenta$/ do |cantidad|
Account.new (amount.to_i)
end 
Cuando /^solicito \$ (\d+)$/ do | cantidad|
pending ("¿Cómo simulamos la solicitud de dinero?")
end
Entonces /^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-/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
 
 

Gmane