From d8b0dda618848eb6517e94fd1747317cda008f78 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 25 Jan 2016 15:48:03 +0200 Subject: Allow non-ASCII in scenario, step names Thanks to Heikki Haapala for reporting the problem. --- NEWS | 6 ++++++ simple.scenario | 13 ++++++++++++- yarn | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 8591ccc..d6c48ea 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,12 @@ NEWS for cmdtest This file summarizes changes between releases of cmdtest. +Version 0.20, released UNRELEASED +--------------------------------- + +* Allow scenario and step names to have non-ASCII text. Thanks to + Heikki Haapala for reporting the problem. + Version 0.19, released 2016-01-09 --------------------------------- diff --git a/simple.scenario b/simple.scenario index 5beed80..72dfebe 100644 --- a/simple.scenario +++ b/simple.scenario @@ -15,7 +15,18 @@ The following is the actual test in this scenario: AND not all is well FINALLY cleanup -We also support some non-ASCII text: älämölö. +We also support some non-ASCII text: älämölö. We support that also in +scenario and step names: + + SCENARIO fööbär + GIVEN örrör + THEN trööt + + IMPLEMENTS GIVEN örrör + true + + IMPLEMENTS THEN trööt + true We can have code examples: diff --git a/yarn b/yarn index 0782a8f..f36bbd4 100755 --- a/yarn +++ b/yarn @@ -322,7 +322,7 @@ class YarnRunner(cliapp.Application): started = time.time() self.info(0, 'Running scenario %s' % scenario.name) - self.ts['scenario_name'] = scenario.name + self.ts['scenario_name'] = scenario.name.encode('utf-8') self.ts.flush() self.scenarios_run += 1 @@ -440,7 +440,7 @@ class YarnRunner(cliapp.Application): self.info(1, 'Running step "%s %s"' % (step.what, step.text)) self.ts['current_step'] = step - self.ts['step_name'] = '%s %s' % (step.what, step.text) + self.ts['step_name'] = '%s %s' % (step.what, step.text.encode('utf8')) self.ts.flush() self.steps_run += 1 -- cgit v1.2.1