(<rdar://problem/
15355124>)
Add a test file for FaxOut.
Update the get_token function to allow {, }, and "," to be values of their own.
Update the collection code to allow multiple top-level collection values (still
no support for embedding member attributes with multiple collection values,
however we don't need to test that right now...)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11802
a1ca3aef-8c08-0410-bb20-
df032aa958be
- Dropped support for AIX, HP-UX, and OSF/1 (aka Digital UNIX)
- Dropped lppasswd and support for Digest authentication in in the
scheduler (STR #4321)
+ - The ipptool program now supports collection attributes with multiple
+ values (<rdar://problem/15355124>)
- The sample drivers now include all of the installed localizations by
default (<rdar://problem/14756625>)
- Adopted Linux man page conventions and updated all man pages
--- /dev/null
+# Fax a test page using Create-Job + Send-Document
+#
+# Usage:
+#
+# ./ipptest -f filename ipp://... fax-job.test
+{
+ # The name of the test...
+ NAME "Create FaxOut Job for 555-1212 and an IPP destination"
+
+ # The operation to use
+ OPERATION Create-Job
+
+ # Attributes, starting in the operation group...
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+
+ GROUP job-attributes-tag
+ ATTR collection destination-uris {
+ MEMBER uri destination-uri tel:4055551212
+ },{
+ MEMBER uri destination-uri ipp://11.22.33.44/ipp/print
+ MEMBER enum print-quality 5
+ MEMBER keyword media na_letter_8.5x11in
+ }
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+
+ # What attributes do we expect?
+ EXPECT job-id OF-TYPE integer WITH-VALUE >0
+ EXPECT job-uri OF-TYPE uri
+}
+{
+ # The name of the test...
+ NAME "Send FaxOut Document"
+
+ # The operation to use
+ OPERATION Send-Document
+
+ # Attributes, starting in the operation group...
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $job-id
+ ATTR name requesting-user-name $user
+ ATTR mimetype document-format $filetype
+ ATTR boolean last-document true
+
+ FILE $filename
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+}
pass = 0;
goto test_exit;
}
+
+ do
+ {
+ ipp_t *col; /* Collection value */
+ long pos = ftell(fp); /* Save position of file */
+
+ if (!get_token(fp, token, sizeof(token), &linenum))
+ break;
+
+ if (strcmp(token, ","))
+ {
+ fseek(fp, pos, SEEK_SET);
+ break;
+ }
+
+ if (!get_token(fp, token, sizeof(token), &linenum) || strcmp(token, "{"))
+ {
+ print_fatal_error("Unexpected \"%s\" on line %d.", token, linenum);
+ pass = 0;
+ goto test_exit;
+ break;
+ }
+
+ if ((col = get_collection(vars, fp, &linenum)) == NULL)
+ break;
+
+ ippSetCollection(request, &attrptr, ippGetCount(attrptr), col);
+ lastcol = attrptr;
+ }
+ while (!strcmp(token, "{"));
break;
case IPP_TAG_STRING :
(*linenum) ++;
}
+ else if (ch == '{' || ch == '}' || ch == ',')
+ {
+ buf[0] = (char)ch;
+ buf[1] = '\0';
+
+ return (buf);
+ }
else
{
/*
278C58EA136B64B000836530 /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E6136B64B000836530 /* Kerberos.framework */; };
278C58EB136B64B000836530 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E7136B64B000836530 /* Security.framework */; };
278C58EC136B64B000836530 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E8136B64B000836530 /* SystemConfiguration.framework */; };
+ 7200511218F492F200E7B81B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E5136B64AF00836530 /* CoreFoundation.framework */; };
720DD6CD1358FD720064AA82 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
720DD6D31358FDDE0064AA82 /* snmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 720DD6D21358FDDE0064AA82 /* snmp.c */; };
720DD6D413590AB90064AA82 /* ieee1284.c in Sources */ = {isa = PBXBuildFile; fileRef = 724379CA1334000E009631B9 /* ieee1284.c */; };
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 7200511218F492F200E7B81B /* CoreFoundation.framework in Frameworks */,
274FF6231333321400317ECB /* libcups.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;