Permalink
Browse files

Down to 15 failures

  • Loading branch information...
aslakhellesoy committed Apr 18, 2010
1 parent 90af84e commit 7595c1db4094b31cacd5d38f8e97839eceae4dec
Showing with 62 additions and 64 deletions.
  1. +57 −55 features/language_help.feature
  2. +1 −1 lib/cucumber/ast/step_invocation.rb
  3. +4 −8 lib/cucumber/cli/options.rb
@@ -7,66 +7,68 @@ Feature: Language help
When I run cucumber --i18n pt help
Then it should pass with
"""
- | name | Portuguese |
- | native | português |
- | feature | Funcionalidade |
- | background | Contexto |
- | scenario | Cenário / Cenario |
- | scenario_outline | Esquema do Cenário / Esquema do Cenario |
- | examples | Exemplos |
- | given | * / Dado |
- | when | * / Quando |
- | then | * / Então / Entao |
- | and | * / E |
- | but | * / Mas |
+ | feature | "Funcionalidade " |
+ | background | "Contexto " |
+ | scenario | "Cenário ", "Cenario " |
+ | scenario_outline | "Esquema do Cenário ", "Esquema do Cenario " |
+ | examples | "Exemplos " |
+ | given | "* ", "Dado " |
+ | when | "* ", "Quando " |
+ | then | "* ", "Então ", "Entao " |
+ | and | "* ", "E " |
+ | but | "* ", "Mas " |
+ | given (code) | "Dado" |
+ | when (code) | "Quando" |
+ | then (code) | "Então", "Entao" |
"""
Scenario: List languages
When I run cucumber --i18n help
+ Then STDERR should be empty
Then it should pass with
"""
- | ar | Arabic | العربية |
- | bg | Bulgarian | български |
- | ca | Catalan | català |
- | cs | Czech | Česky |
- | cy-GB | Welsh | Cymraeg |
- | da | Danish | dansk |
- | de | German | Deutsch |
- | en | English | English |
- | en-Scouse | Scouse | Scouse |
- | en-au | Australian | Australian |
- | en-lol | LOLCAT | LOLCAT |
- | en-tx | Texan | Texan |
- | eo | Esperanto | Esperanto |
- | es | Spanish | español |
- | et | Estonian | eesti keel |
- | fi | Finnish | suomi |
- | fr | French | français |
- | he | Hebrew | עברית |
- | hr | Croatian | hrvatski |
- | hu | Hungarian | magyar |
- | id | Indonesian | Bahasa Indonesia |
- | it | Italian | italiano |
- | ja | Japanese | 日本語 |
- | ko | Korean | 한국어 |
- | lt | Lithuanian | lietuvių kalba |
- | lv | Latvian | latviešu |
- | nl | Dutch | Nederlands |
- | no | Norwegian | norsk |
- | pl | Polish | polski |
- | pt | Portuguese | português |
- | ro | Romanian | română |
- | ro-RO | Romanian (diacritical) | română (diacritical) |
- | ru | Russian | русский |
- | sk | Slovak | Slovensky |
- | sr-Cyrl | Serbian | Српски |
- | sr-Latn | Serbian (Latin) | Srpski (Latinica) |
- | sv | Swedish | Svenska |
- | tr | Turkish | Türkçe |
- | uk | Ukrainian | Українська |
- | uz | Uzbek | Узбекча |
- | vi | Vietnamese | Tiếng Việt |
- | zh-CN | Chinese simplified | 简体中文 |
- | zh-TW | Chinese traditional | 繁體中文 |
+ | ar | Arabic | العربية |
+ | bg | Bulgarian | български |
+ | ca | Catalan | català |
+ | cs | Czech | Česky |
+ | cy-GB | Welsh | Cymraeg |
+ | da | Danish | dansk |
+ | de | German | Deutsch |
+ | en | English | English |
+ | en-Scouse | Scouse | Scouse |
+ | en-au | Australian | Australian |
+ | en-lol | LOLCAT | LOLCAT |
+ | en-tx | Texan | Texan |
+ | eo | Esperanto | Esperanto |
+ | es | Spanish | español |
+ | et | Estonian | eesti keel |
+ | fi | Finnish | suomi |
+ | fr | French | français |
+ | he | Hebrew | עברית |
+ | hr | Croatian | hrvatski |
+ | hu | Hungarian | magyar |
+ | id | Indonesian | Bahasa Indonesia |
+ | it | Italian | italiano |
+ | ja | Japanese | 日本語 |
+ | ko | Korean | 한국어 |
+ | lt | Lithuanian | lietuvių kalba |
+ | lv | Latvian | latviešu |
+ | nl | Dutch | Nederlands |
+ | no | Norwegian | norsk |
+ | pl | Polish | polski |
+ | pt | Portuguese | português |
+ | ro | Romanian | română |
+ | ro-RO | Romanian (diacritical) | română (diacritical) |
+ | ru | Russian | русский |
+ | sk | Slovak | Slovensky |
+ | sr-Cyrl | Serbian | Српски |
+ | sr-Latn | Serbian (Latin) | Srpski (Latinica) |
+ | sv | Swedish | Svenska |
+ | tr | Turkish | Türkçe |
+ | uk | Ukrainian | Українська |
+ | uz | Uzbek | Узбекча |
+ | vi | Vietnamese | Tiếng Việt |
+ | zh-CN | Chinese simplified | 简体中文 |
+ | zh-TW | Chinese traditional | 繁體中文 |
"""
@@ -142,7 +142,7 @@ def previous
end
def actual_keyword
- repeat_keywords = [language.but_keywords(false), language.and_keywords(false)].flatten.uniq.reject{|kw| kw == '* '}
+ repeat_keywords = [language.but_keywords, language.and_keywords].flatten.uniq.reject{|kw| kw == '* '}
if repeat_keywords.index(@step.keyword) && previous
previous.actual_keyword
else
@@ -366,19 +366,15 @@ def reverse_merge(other_options)
self
end
- # TODO: Move to Language
def list_keywords_and_exit(lang)
- unless Cucumber::LANGUAGES[lang]
- raise("No language with key #{lang}")
- end
- require 'cucumber/cli/language_help_formatter'
- LanguageHelpFormatter.list_keywords(@out_stream, lang)
+ require 'gherkin/i18n'
+ @out_stream.write(Gherkin::I18n.get(lang).keyword_table)
Kernel.exit(0)
end
def list_languages_and_exit
- require 'cucumber/cli/language_help_formatter'
- LanguageHelpFormatter.list_languages(@out_stream)
+ require 'gherkin/i18n'
+ @out_stream.write(Gherkin::I18n.language_table)
Kernel.exit(0)
end

0 comments on commit 7595c1d

Please sign in to comment.