+(defun view-to-string (obj &rest args)
+ (with-output-to-string (strm)
+ (apply #'view obj :stream strm args)))
+
+(rem-all-tests)
+
+(deftest p1 (view-to-string mary) "Person:
+ Mary Jackson Thu, 4 May 2000 03:02:01 Style & Grace
+")
+
+(deftest p2 (view-to-string mary :subobjects t) "Person:
+ Mary Jackson Thu, 4 May 2000 03:02:01 Style & Grace
+ Addresses:
+ Home 321 Shady Lane
+ Phone Numbers:
+ Voice 367-9812
+ Fax 367-9813
+ Office 113 Main St.
+ Phone Numbers:
+ Main line 123-0001
+ Staff line 123-0002
+ Fax 123-0005
+")
+
+(deftest p3 (view-to-string mary :category :compact-text-labels)
+ "Person:
+ first-name Mary last-name Jackson dob Thu, 4 May 2000 03:02:01 resume Style & Grace
+")