diff options
author | Nathan Gass | 2008-08-06 14:20:36 +0000 |
---|---|---|
committer | Nathan Gass | 2008-08-06 14:20:36 +0000 |
commit | a9ad07045a2f21ca1ec39ca5e7d636a61e4705ab (patch) | |
tree | d39b1b99db461fc0628bc39bc39c6e3d441fb5a3 /it.class | |
parent | 9d93a6860b5c7f43c5909072ef84847e580f003e (diff) | |
download | itools-a9ad07045a2f21ca1ec39ca5e7d636a61e4705ab.tar.gz itools-a9ad07045a2f21ca1ec39ca5e7d636a61e4705ab.tar.bz2 itools-a9ad07045a2f21ca1ec39ca5e7d636a61e4705ab.zip |
debuged, added basic tests
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -518,7 +518,7 @@ function getopt($helplines) $witharg[$longoptname ? $longoptname : $shortoptname] = $longoptarg || $shortoptarg; } } - $witharg['debug'] = 1; + $witharg['debug'] = true; $mandatoryargs = array(); if ($tmp = trim(it::replace(array("\n.*" => "", "^\S+\s+\S+\s*" => "", "\[.*?\]\s*" => ""), trim($helplines)))) @@ -533,7 +533,7 @@ function getopt($helplines) else $result[array_shift($eat)] = $arg; } - elseif ($matches = (array)it::match('^--(\w[\w-]*)(=\S*)?', $arg)) + elseif ($matches = (array)it::match('^--(\w[\w-]*)(=.*)?', $arg)) { list($optname, $val) = $matches; if (!isset($witharg[$optname]) || isset($val) && !$witharg[$optname]) |