summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-01-25 16:31:33 +0200
committerLars Wirzenius <liw@liw.fi>2016-01-25 16:43:28 +0200
commitf3044f9c552b7b40ee22cf52f369d3e67cbdf14d (patch)
tree3695fe54d0f0c37f428d921ed5423bb2ffd11870
parent4f51af7183116b8ef39eea60833326e079cc8885 (diff)
downloadcmdtest-f3044f9c552b7b40ee22cf52f369d3e67cbdf14d.tar.gz
Encode environment variables in UTF-8
This is an arbitary choice, and wrong, if the locale has something else. I'll fix that some other day.
-rw-r--r--NEWS7
-rw-r--r--simple.scenario8
-rwxr-xr-xyarn2
3 files changed, 12 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index c86d255..71fd580 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,13 @@ NEWS for cmdtest
This file summarizes changes between releases of cmdtest.
+Version 0.21, released 2016-01-25
+---------------------------------
+
+* Fixed another non-ASCII problem in yarns. Also found by Heikki
+ Haapala. This time, environment variable values must be encoded (we
+ do UTF-8).
+
Version 0.20, released 2016-01-25
---------------------------------
diff --git a/simple.scenario b/simple.scenario
index 72dfebe..c08388d 100644
--- a/simple.scenario
+++ b/simple.scenario
@@ -19,13 +19,13 @@ 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
+ GIVEN thing örrör
+ THEN thing trööt
- IMPLEMENTS GIVEN örrör
+ IMPLEMENTS GIVEN thing (.*)
true
- IMPLEMENTS THEN trööt
+ IMPLEMENTS THEN thing (.*)
true
We can have code examples:
diff --git a/yarn b/yarn
index cc41177..f1cabb3 100755
--- a/yarn
+++ b/yarn
@@ -451,7 +451,7 @@ class YarnRunner(cliapp.Application):
env['SRCDIR'] = os.getcwd()
env['HOME'] = self.homedir(datadir)
for i, match in enumerate(m.groups('')):
- env['MATCH_%d' % (i+1)] = match
+ env['MATCH_%d' % (i+1)] = match.encode('utf-8')
if self.settings['cd-datadir']:
cwd = datadir