http://bugs.winehq.org/show_bug.cgi?id=33639
Bug #: 33639 Summary: wine cmd wrong assignment while using set "var=value" and have spaces after Product: Wine Version: 1.5.30 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd AssignedTo: wine-bugs@winehq.org ReportedBy: loentar@gmail.com Classification: Unclassified
Wine cmd wrongly assign space chars into variable name when using `set "var=value"` form. Spaces after `value"` must not appear in `var`.
This is important thing, because when variable will be inserted into conditional expression it may failed (I keep ^M char to see spaces). For example this lines is failed under wine cmd but works under winxp: ---- set "var=value" ^M if "x%var%"=="xvalue" (echo ok) else (echo fail)^M ----
some test (I keep ^M char to see spaces):
-- start of test.cmd: --
@echo off^M set var=value ^M :: space symbol must appear in `var`^M echo "%var%"^M ^M set "var=value" ^M :: space symbol must NOT appear in `var`^M echo "%var%"^M ^M -- end of test.cmd: --
start under winxp:
----
test.cmd
"value " "value" ----
start under wine cmd:
----
test.cmd
"value " "value " ----