[py-configparser-cvs] r28 - in branches/1.0.x: . tests
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Sat Mar 15 23:05:41 UTC 2008
Author: ehuelsmann
Date: Sat Mar 15 18:05:40 2008
New Revision: 28
Modified:
branches/1.0.x/parser.lisp
branches/1.0.x/tests/tests.lisp
Log:
Backport r27.
Modified: branches/1.0.x/parser.lisp
==============================================================================
--- branches/1.0.x/parser.lisp (original)
+++ branches/1.0.x/parser.lisp Sat Mar 15 18:05:40 2008
@@ -31,8 +31,7 @@
(handler-case
(%get-section config section-name)
(no-section-error ()
- (add-section config section-name)))
- section-name)
+ (add-section config section-name))))
(defun is-whitespace (c)
(or (eq c #\Space)
@@ -47,7 +46,7 @@
(loop for c = (%read-char s)
while (is-whitespace c)))
-(defun skip-emtpy-line (s)
+(defun skip-empty-line (s)
(loop for c = (%read-char s)
if (eq c #\Newline) do (return)
else unless (is-whitespace c)
Modified: branches/1.0.x/tests/tests.lisp
==============================================================================
--- branches/1.0.x/tests/tests.lisp (original)
+++ branches/1.0.x/tests/tests.lisp Sat Mar 15 18:05:40 2008
@@ -110,6 +110,17 @@
'config))
T)
+;; empty lines only
+(deftest basic.empty-lines-only
+ (with-input-from-string (s "
+
+
+")
+ (typep (get-option read-stream (make-config) s)
+ 'config))
+ T)
+
+
;; options
(deftest basic.options
(equal (with-input-from-string (s "[n]
More information about the Py-configparser-cvs
mailing list