Index: generic/nsf.c =================================================================== diff -u -re7a27ff80df0f9c20be649e1ea1d0bc55f045739 -rd679ea5694ec3aad76b06767bb23287965304db9 --- generic/nsf.c (.../nsf.c) (revision e7a27ff80df0f9c20be649e1ea1d0bc55f045739) +++ generic/nsf.c (.../nsf.c) (revision d679ea5694ec3aad76b06767bb23287965304db9) @@ -15776,7 +15776,8 @@ } } flag = ObjStr(obj); - /*fprintf(stderr, "we have a scalar '%s'\n", flag);*/ + /*fprintf(stderr, "we have a scalar '%s' firstArg %d\n", flag, firstArg);*/ + if ((*flag == '-') && isalpha(*((flag)+1))) { if (firstArg) { /* if the argument contains a space, try to split */ @@ -21543,7 +21544,7 @@ nextArgc = 0; for (j = i+1; j < objc; j++, argc++) { - if ((isdasharg = IsDashArg(interp, objv[j], j==i+1, &nextMethodName, &nextArgc, &nextArgv))) { + if ((isdasharg = IsDashArg(interp, objv[j], 1, &nextMethodName, &nextArgc, &nextArgv))) { break; } } Index: library/xotcl/tests/speedtest.xotcl =================================================================== diff -u -r9a0b8bb0992be0561d8187c275fc1d9b7e0bbcd0 -rd679ea5694ec3aad76b06767bb23287965304db9 --- library/xotcl/tests/speedtest.xotcl (.../speedtest.xotcl) (revision 9a0b8bb0992be0561d8187c275fc1d9b7e0bbcd0) +++ library/xotcl/tests/speedtest.xotcl (.../speedtest.xotcl) (revision d679ea5694ec3aad76b06767bb23287965304db9) @@ -4,6 +4,23 @@ package require XOTcl 2.0; namespace import ::xotcl::* package require nx::test; namespace import nx::Test +Test new -msg {test multiple dashed args o0} \ + -cmd {Object create o0 [list -set a -a1] [list -set b "-b 1 -y 2"]} \ + -expected ::o0 \ + -post {o0 destroy} +Test new -msg {test multiple dashed args o1} \ + -cmd {Object create o1 -proc foo args {return 1} [list -set a -a1] [list -set b "-b 1 -y 2"]} \ + -expected ::o1 \ + -post {o1} +Test new -msg {test multiple dashed args o2} \ + -cmd {Object create o2 {-proc foo args {return 1}} {-set -a -t1} {-set b "-b 1 -y 2"}} \ + -expected ::o2 \ + -post {o2 destroy} +Test new -msg {test multiple dashed args o3} \ + -cmd {Object create o3 -proc foo args {return 1} {-set -a -t1} {-set b "-b 1 -y 2"}} \ + -expected ::o3 \ + -post {o3 destroy} + Test parameter count 1000 @ @File {description { @@ -16,7 +33,7 @@ #set ocount 1014 #set ocount [expr {$ccount + 206}] #set ocount [expr {$ccount + 15}] -set ocount [expr {$ccount + 5}] +set ocount [expr {$ccount + 6}] Class M1; Class M2 Class C -parameter {{p 99} {q 98} r} @@ -543,8 +560,8 @@ -pre {Class A -instproc br {} {return -code break}; A create a1} \ -cmd {catch {a1 br}} -expected 3 -count 2 \ -post {A destroy; a1 destroy} - + Test run; exit