[fiveam-devel] small default formatting output patch

Matthew Curry mjcurry at gmail.com
Sun Nov 18 04:35:53 UTC 2012


Hi,

Attached is a diff of check.lisp.  I got annoyed with the (otherwise
really really awesome) default 'is' macro output, which when testing
large-ish s-exps, it all gets crammed to the right margin.

I've also attached a before and after text file so you can see what I
mean.  If you can incorporate my change (or if you know a better way
to do this) that would be great!

-Matt
-------------- next part --------------
CL-USER> (5am:run! 'kql::kql-compiling)
..f.
 Did 4 checks.
    Pass: 3 (75%)
    Skip: 0 ( 0%)
    Fail: 1 (25%)

 Failure Details:
 --------------------------------
 ELIMINATES-A-REDUNDANT-NESTING []: 
      (ELIMINATE-NESTING
 (PARSE "(NOT (apple AND orange)) OR (foo AND baz) AND NOT (quux AND bar)")) evaluated to (:OR
                                                                                           (:NOT
                                                                                            (:AND
                                                                                             (:KEYWORD
                                                                                              "apple")
                                                                                             (:KEYWORD
                                                                                              "orange")))
                                                                                           (:AND
                                                                                            (:AND
                                                                                             (:KEYWORD
                                                                                              "foo")
                                                                                             (:KEYWORD
                                                                                              "baz"))
                                                                                            (:NOT
                                                                                             (:AND
                                                                                              (:KEYWORD
                                                                                               "quux")
                                                                                              (:KEYWORD
                                                                                               "bar"))))), which is not EQUALP to (:OR
                                                                                                                                   (:NOT
                                                                                                                                    (:AND
                                                                                                                                     (:KEYWORD
                                                                                                                                      "apple")
                                                                                                                                     (:KEYWORD
                                                                                                                                      "orange")))
                                                                                                                                   (:AND
                                                                                                                                    (:KEYWORD
                                                                                                                                     "foo")
                                                                                                                                    (:KEYWORD
                                                                                                                                     "baz")
                                                                                                                                    (:NOT
                                                                                                                                     (:AND
                                                                                                                                      (:KEYWORD
                                                                                                                                       "quux")
                                                                                                                                      (:KEYWORD
                                                                                                                                       "bar")))))..
 --------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check-output.diff
Type: application/octet-stream
Size: 2092 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/fiveam-devel/attachments/20121117/273027be/attachment.obj>
-------------- next part --------------
CL-USER> (5am:run! 'kql::kql-compiling)
..f.
 Did 4 checks.
    Pass: 3 (75%)
    Skip: 0 ( 0%)
    Fail: 1 (25%)

 Failure Details:
 --------------------------------
 ELIMINATES-A-REDUNDANT-NESTING []: 
      
(ELIMINATE-NESTING
 (PARSE "(NOT (apple AND orange)) OR (foo AND baz) AND NOT (quux AND bar)"))

 evaluated to 

(:OR (:NOT (:AND (:KEYWORD "apple") (:KEYWORD "orange")))
 (:AND (:AND (:KEYWORD "foo") (:KEYWORD "baz"))
  (:NOT (:AND (:KEYWORD "quux") (:KEYWORD "bar")))))

 which is not 

EQUALP

 to 

(:OR (:NOT (:AND (:KEYWORD "apple") (:KEYWORD "orange")))
 (:AND (:KEYWORD "foo") (:KEYWORD "baz")
  (:NOT (:AND (:KEYWORD "quux") (:KEYWORD "bar")))))

..
 --------------------------------

NIL


More information about the fiveam-devel mailing list