Ticket #147: embed-spaces-cmdline.patch
File embed-spaces-cmdline.patch, 2.5 KB (added by hopscc, 16 years ago) |
---|
-
Source/Compiler.cobra
560 560 561 561 if argList and argList.count 562 562 args = p.startInfo.arguments ? '' 563 args += Utils.join(' ', argList) 564 p.startInfo.arguments = args 563 hasSpaces = any for a in argList where ' ' in a 564 if hasSpaces 565 modArgList = List<of String>() 566 for a in argList 567 newArg = if(' ' in a, '"[a]"', a) 568 modArgList.add(newArg) 569 args += Utils.join(' ', modArgList) 570 else 571 args += Utils.join(' ', argList) 572 p.startInfo.arguments = args 565 573 return p 566 574 567 575 ## -
Tests/700-command-line/700-run-args.cobra
13 13 .verify(cobraPath, '[echo] -- argA argB argC', 'argA argB argC') 14 14 .verify(cobraPath, '[echo] -run-args x1arg1 x1argB x1argC', 'x1arg1 x1argB x1argC') 15 15 .verify(cobraPath, '-r [echo] -run-args x2arg1 x2argB x2argC', 'x2arg1 x2argB x2argC') 16 .verify(cobraPath, '[echo] -- "argA argB argC"', 'argA argB argC :1') 17 # below exercises broken windows process quoting with '' 18 #.verify(cobraPath, "[echo] -- 'argA1 argB1 argC1'", 'argA1 argB1 argC1 :1') 16 19 17 20 def verify(cobraPath as String, cmdln as String, expectedText as String)is shared 18 21 p as System.Diagnostics.Process? -
Tests/700-command-line/702-echo.cobra
6 6 for a in args[1:] 7 7 print '[sep][a]' stop 8 8 sep = ' ' 9 if args.count >1 10 print ' :[args.count-1]' stop 9 11 print -
Developer/IntermediateReleaseNotes.text
324 324 * Fixed: An unterminated doc string gives an internal error instead of a friendly error message. 325 325 326 326 * Fixed: Using a type from a binary library with internal methods referring to internal types caused an uncaught exception in the compiler. 327 328 * Fixed: String parameters with spaces in commandline. ticket:147