summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2010-09-22 22:13:21 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2010-09-22 22:13:21 +0000
commit7cf5915ead7c80b3011a37eaade214568d938f5b (patch)
tree54222dc1e2b1c447232301c6441769d2364f08b6 /test
parent030ae6a14e49fda8ca30a2c0e065600c3984081a (diff)
downloadcups-7cf5915ead7c80b3011a37eaade214568d938f5b.tar.gz
Merge changes from CUPS 1.5svn-r9313.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@2683 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'test')
-rw-r--r--test/Dependencies16
-rw-r--r--test/ipp-1.1.test4
-rw-r--r--test/ipp-2.0.test14
-rw-r--r--test/ipp-2.1.test2
-rw-r--r--test/ipptool.c166
-rw-r--r--test/print-job-media-col.test6
-rw-r--r--test/print-uri.test27
-rwxr-xr-xtest/run-stp-tests.sh2
8 files changed, 178 insertions, 59 deletions
diff --git a/test/Dependencies b/test/Dependencies
index 1487c3aa5..ac77ec7fc 100644
--- a/test/Dependencies
+++ b/test/Dependencies
@@ -1,11 +1,11 @@
# DO NOT DELETE THIS LINE -- make depend depends on it.
ipptool.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h
-ipptool.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h
-ipptool.o: ../cups/language.h ../cups/array.h ../cups/string-private.h
-ipptool.o: ../config.h ../cups/debug-private.h ../cups/ppd-private.h
-ipptool.o: ../cups/ppd.h ../cups/cups.h ../cups/pwg-private.h
-ipptool.o: ../cups/http-private.h ../cups/http.h ../cups/md5-private.h
-ipptool.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/language-private.h
-ipptool.o: ../cups/transcode.h ../cups/thread-private.h
-ipptool.o: ../cups/file-private.h ../cups/cups-private.h
+ipptool.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h
+ipptool.o: ../cups/language.h ../cups/string-private.h ../config.h
+ipptool.o: ../cups/debug-private.h ../cups/ppd-private.h ../cups/ppd.h
+ipptool.o: ../cups/cups.h ../cups/pwg-private.h ../cups/http-private.h
+ipptool.o: ../cups/http.h ../cups/md5-private.h ../cups/ipp-private.h
+ipptool.o: ../cups/ipp.h ../cups/language-private.h ../cups/transcode.h
+ipptool.o: ../cups/thread-private.h ../cups/file-private.h
+ipptool.o: ../cups/cups-private.h
diff --git a/test/ipp-1.1.test b/test/ipp-1.1.test
index fb1caf849..eb547fb01 100644
--- a/test/ipp-1.1.test
+++ b/test/ipp-1.1.test
@@ -442,6 +442,10 @@
#
# Required by: RFC 2911 section 3.2.6
{
+ # Skip this test when doing authenticated printing since we'll always
+ # use the authenticated username over the requesting-user-name value.
+ SKIP-IF-DEFINED uriuser
+
NAME "3.2.6: Get-Jobs Operation (my-jobs different user)"
OPERATION Get-Jobs
GROUP operation-attributes-tag
diff --git a/test/ipp-2.0.test b/test/ipp-2.0.test
index 9f746dcb0..6d9dffa6b 100644
--- a/test/ipp-2.0.test
+++ b/test/ipp-2.0.test
@@ -23,6 +23,10 @@
INCLUDE "ipp-1.1.test"
+# Regular expression for PWG media size names (eek!)
+DEFINE MEDIA_REGEX "/^((custom|na|asme|roc|oe)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])in|(custom|iso|jis|jpn|prc|om)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)$$/"
+
+
# Test required printer description attribute support.
#
# Required by: PWG 5100.10 section 6.2
@@ -38,13 +42,16 @@ INCLUDE "ipp-1.1.test"
STATUS successful-ok
+ # Figure out capabilities
+ EXPECT color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true DEFINE-MATCH PRINTER_IS_COLOR
+
# Job template attributes
EXPECT copies-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT copies-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag
EXPECT finishings-default OF-TYPE enum IN-GROUP printer-attributes-tag
EXPECT finishings-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3
- EXPECT media-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
- EXPECT media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag
+ EXPECT media-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$MEDIA_REGEX"
+ EXPECT media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-VALUE "$MEDIA_REGEX"
EXPECT orientation-requested-default OF-TYPE enum,no-value IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE no-value,3,4,5,6
EXPECT orientation-requested-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5,6
EXPECT output-bin-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
@@ -59,7 +66,8 @@ INCLUDE "ipp-1.1.test"
# Printer description attributes
EXPECT color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
EXPECT pages-per-minute OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
- EXPECT pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
+ EXPECT pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED PRINTER_IS_COLOR
+ EXPECT !pages-per-minute-color IF-NOT-DEFINED PRINTER_IS_COLOR
EXPECT printer-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
EXPECT printer-location OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
EXPECT printer-make-and-model OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
diff --git a/test/ipp-2.1.test b/test/ipp-2.1.test
index e52cb25e7..98126947e 100644
--- a/test/ipp-2.1.test
+++ b/test/ipp-2.1.test
@@ -14,7 +14,7 @@
#
# Usage:
#
-# ./ipptool -V 2.1 -f filename -t printer-uri ipp-2.1.test
+# ./ipptool -V 2.1 {-d PRINTER_IS_COLOR=1} -f filename -t printer-uri ipp-2.1.test
#
# Do all of the IPP/1.1 and IPP/2.0 tests as an IPP/2.1 client
diff --git a/test/ipptool.c b/test/ipptool.c
index ac8ee8864..330c5212d 100644
--- a/test/ipptool.c
+++ b/test/ipptool.c
@@ -25,11 +25,12 @@
* get_variable() - Get the value of a variable.
* iso_date() - Return an ISO 8601 date/time string for the given IPP
* dateTime value.
+ * password_cb() - Password callback for authenticated tests.
* print_attr() - Print an attribute on the screen.
* print_col() - Print a collection attribute on the screen.
* print_csv() - Print a line of CSV text.
* print_fatal_error() - Print a fatal error message.
- * print_line() - Print a line of formatted text.
+ * print_line() - Print a line of formatted or CSV text.
* print_test_error() - Print a test error message.
* print_xml_header() - Print a standard XML plist header.
* print_xml_string() - Print an XML string with escaping.
@@ -81,7 +82,7 @@ typedef struct _cups_expect_s /**** Expected attribute info ****/
*of_type, /* Type name */
*same_count_as, /* Parallel attribute name */
*if_defined, /* Only required if variable defined */
- *if_undefined, /* Only required if variable is not defined */
+ *if_not_defined, /* Only required if variable is not defined */
*with_value, /* Attribute must include this value */
*define_match, /* Variable to define on match */
*define_no_match, /* Variable to define on no-match */
@@ -95,7 +96,7 @@ typedef struct _cups_status_s /**** Status info ****/
{
ipp_status_t status; /* Expected status code */
char *if_defined, /* Only if variable is defined */
- *if_undefined; /* Only if variable is not defined */
+ *if_not_defined; /* Only if variable is not defined */
} _cups_status_t;
typedef struct _cups_var_s /**** Variable ****/
@@ -130,6 +131,7 @@ int IgnoreErrors = 0, /* Ignore errors? */
Verbosity = 0, /* Show all attributes? */
Version = 11, /* Default IPP version */
XMLHeader = 0; /* 1 if header is written */
+char *Password = NULL; /* Password from URI */
const char * const URIStatusStrings[] = /* URI status strings */
{
"URI too large",
@@ -167,6 +169,7 @@ static char *get_token(FILE *fp, char *buf, int buflen,
int *linenum);
static char *get_variable(_cups_vars_t *vars, const char *name);
static char *iso_date(ipp_uchar_t *date);
+static const char *password_cb(const char *prompt);
static void print_attr(ipp_attribute_t *attr);
static void print_col(ipp_t *col);
static void print_csv(ipp_attribute_t *attr, int num_displayed,
@@ -190,7 +193,8 @@ static void set_variable(_cups_vars_t *vars, const char *name,
const char *value);
static void usage(void);
static int validate_attr(ipp_attribute_t *attr, int print);
-static int with_value(char *value, int regex, ipp_attribute_t *attr);
+static int with_value(char *value, int regex, ipp_attribute_t *attr,
+ int report);
/*
@@ -428,9 +432,12 @@ main(int argc, /* I - Number of command-line args */
}
}
}
- else if (!strncmp(argv[i], "ipp://", 6) ||
- !strncmp(argv[i], "http://", 7) ||
- !strncmp(argv[i], "https://", 8))
+ else if (!strncmp(argv[i], "ipp://", 6) || !strncmp(argv[i], "http://", 7)
+#ifdef HAVE_SSL
+ || !strncmp(argv[i], "ipps://", 7)
+ || !strncmp(argv[i], "https://", 8)
+#endif /* HAVE_SSL */
+ )
{
/*
* Set URI...
@@ -442,6 +449,11 @@ main(int argc, /* I - Number of command-line args */
usage();
}
+#ifdef HAVE_SSL
+ if (!strncmp(argv[i], "ipps://", 7) || !strncmp(argv[i], "https://", 8))
+ vars.encryption = HTTP_ENCRYPT_ALWAYS;
+#endif /* HAVE_SSL */
+
vars.uri = argv[i];
uri_status = httpSeparateURI(HTTP_URI_CODING_ALL, vars.uri,
vars.scheme, sizeof(vars.scheme),
@@ -457,12 +469,14 @@ main(int argc, /* I - Number of command-line args */
return (1);
}
- if (strcmp(vars.scheme, "http") && strcmp(vars.scheme, "https") &&
- strcmp(vars.scheme, "ipp"))
+ if (vars.userpass[0])
{
- _cupsLangPuts(stderr, _("ipptool: Only http, https, and ipp URIs are "
- "supported."));
- return (1);
+ if ((Password = strchr(vars.userpass, ':')) != NULL)
+ *Password++ = '\0';
+
+ cupsSetUser(vars.userpass);
+ cupsSetPasswordCB(password_cb);
+ set_variable(&vars, "uriuser", vars.userpass);
}
}
else
@@ -855,7 +869,7 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
strcasecmp(token, "DEFINE-NO-MATCH") &&
strcasecmp(token, "DEFINE-VALUE") &&
strcasecmp(token, "IF-DEFINED") &&
- strcasecmp(token, "IF-UNDEFINED") &&
+ strcasecmp(token, "IF-NOT-DEFINED") &&
strcasecmp(token, "IN-GROUP") &&
strcasecmp(token, "OF-TYPE") &&
strcasecmp(token, "SAME-COUNT-AS") &&
@@ -863,7 +877,7 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
last_expect = NULL;
if (strcasecmp(token, "IF-DEFINED") &&
- strcasecmp(token, "IF-UNDEFINED"))
+ strcasecmp(token, "IF-NOT-DEFINED"))
last_status = NULL;
if (!strcmp(token, "}"))
@@ -1197,7 +1211,12 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
goto test_exit;
}
else
+ {
+ if (Output == _CUPS_OUTPUT_TEST)
+ printf(" [%d second delay]\n", delay);
+
sleep(delay);
+ }
}
else if (!strcasecmp(token, "ATTR"))
{
@@ -1431,7 +1450,7 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
num_statuses ++;
last_status->if_defined = NULL;
- last_status->if_undefined = NULL;
+ last_status->if_not_defined = NULL;
}
else if (!strcasecmp(token, "EXPECT"))
{
@@ -1642,22 +1661,22 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
goto test_exit;
}
}
- else if (!strcasecmp(token, "IF-UNDEFINED"))
+ else if (!strcasecmp(token, "IF-NOT-DEFINED"))
{
if (!get_token(fp, token, sizeof(token), &linenum))
{
- print_fatal_error("Missing IF-UNDEFINED name on line %d.", linenum);
+ print_fatal_error("Missing IF-NOT-DEFINED name on line %d.", linenum);
pass = 0;
goto test_exit;
}
if (last_expect)
- last_expect->if_undefined = strdup(token);
+ last_expect->if_not_defined = strdup(token);
else if (last_status)
- last_status->if_undefined = strdup(token);
+ last_status->if_not_defined = strdup(token);
else
{
- print_fatal_error("IF-UNDEFINED without a preceding EXPECT or STATUS "
+ print_fatal_error("IF-NOT-DEFINED without a preceding EXPECT or STATUS "
"on line %d.", linenum);
pass = 0;
goto test_exit;
@@ -1665,7 +1684,7 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
}
else if (!strcasecmp(token, "WITH-VALUE"))
{
- if (!get_token(fp, token, sizeof(token), &linenum))
+ if (!get_token(fp, temp, sizeof(temp), &linenum))
{
print_fatal_error("Missing WITH-VALUE value on line %d.", linenum);
pass = 0;
@@ -1674,7 +1693,14 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
if (last_expect)
{
+ /*
+ * Expand any variables in the value and then save it.
+ */
+
+ expand_variables(vars, token, temp, sizeof(token));
+
tokenptr = token + strlen(token) - 1;
+
if (token[0] == '/' && tokenptr > token && *tokenptr == '/')
{
/*
@@ -1782,13 +1808,13 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
puts("<key>Successful</key>");
puts("<true />");
puts("<key>StatusCode</key>");
- print_xml_string("string", "skipped");
+ print_xml_string("string", "skip");
puts("<key>ResponseAttributes</key>");
puts("<dict>");
puts("</dict>");
}
else if (Output == _CUPS_OUTPUT_TEST)
- puts("SKIPPED]");
+ puts("SKIP]");
goto skip_error;
}
@@ -1846,9 +1872,12 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
if (http->version != HTTP_1_1)
prev_pass = pass = 0;
- if (response->request.status.version[0] != (version / 10) ||
- response->request.status.version[1] != (version % 10) ||
- response->request.status.request_id != request_id)
+ if (response->request.status.request_id != request_id)
+ prev_pass = pass = 0;
+
+ if (version &&
+ (response->request.status.version[0] != (version / 10) ||
+ response->request.status.version[1] != (version % 10)))
prev_pass = pass = 0;
if ((attrptr = ippFindAttribute(response, "job-id",
@@ -1929,8 +1958,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
!get_variable(vars, statuses[i].if_defined))
continue;
- if (statuses[i].if_undefined &&
- get_variable(vars, statuses[i].if_undefined))
+ if (statuses[i].if_not_defined &&
+ get_variable(vars, statuses[i].if_not_defined))
continue;
if (response->request.status.status_code == statuses[i].status)
@@ -1946,7 +1975,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
if (expect->if_defined && !get_variable(vars, expect->if_defined))
continue;
- if (expect->if_undefined && get_variable(vars, expect->if_undefined))
+ if (expect->if_not_defined &&
+ get_variable(vars, expect->if_not_defined))
continue;
found = ippFindAttribute(response, expect->name, IPP_TAG_ZERO);
@@ -1966,7 +1996,7 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
}
if (found &&
- !with_value(expect->with_value, expect->with_regex, found))
+ !with_value(expect->with_value, expect->with_regex, found, 0))
{
if (expect->define_no_match)
set_variable(vars, expect->define_no_match, "1");
@@ -2135,8 +2165,9 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
cupsLastErrorString());
else
{
- if (response->request.status.version[0] != (version / 10) ||
- response->request.status.version[1] != (version % 10))
+ if (version &&
+ (response->request.status.version[0] != (version / 10) ||
+ response->request.status.version[1] != (version % 10)))
print_test_error("Bad version %d.%d in response - expected %d.%d "
"(RFC 2911 section 3.1.8).",
response->request.status.version[0],
@@ -2253,8 +2284,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
!get_variable(vars, statuses[i].if_defined))
continue;
- if (statuses[i].if_undefined &&
- get_variable(vars, statuses[i].if_undefined))
+ if (statuses[i].if_not_defined &&
+ get_variable(vars, statuses[i].if_not_defined))
continue;
if (response->request.status.status_code == statuses[i].status)
@@ -2276,7 +2307,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
if (expect->if_defined && !get_variable(vars, expect->if_defined))
continue;
- if (expect->if_undefined && get_variable(vars, expect->if_undefined))
+ if (expect->if_not_defined &&
+ get_variable(vars, expect->if_not_defined))
continue;
found = ippFindAttribute(response, expect->name, IPP_TAG_ZERO);
@@ -2297,7 +2329,7 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
expect->name, ippTagString(expect->in_group),
ippTagString(found->group_tag));
- if (!with_value(expect->with_value, expect->with_regex, found))
+ if (!with_value(expect->with_value, expect->with_regex, found, 0))
{
if (expect->with_regex)
print_test_error("EXPECTED: %s WITH-VALUE /%s/",
@@ -2305,6 +2337,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
else
print_test_error("EXPECTED: %s WITH-VALUE \"%s\"",
expect->name, expect->with_value);
+
+ with_value(expect->with_value, expect->with_regex, found, 1);
}
if (expect->count > 0 && found->num_values != expect->count)
@@ -2347,8 +2381,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
{
if (statuses[i].if_defined)
free(statuses[i].if_defined);
- if (statuses[i].if_undefined)
- free(statuses[i].if_undefined);
+ if (statuses[i].if_not_defined)
+ free(statuses[i].if_not_defined);
}
num_statuses = 0;
@@ -2361,8 +2395,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
free(expect->same_count_as);
if (expect->if_defined)
free(expect->if_defined);
- if (expect->if_undefined)
- free(expect->if_undefined);
+ if (expect->if_not_defined)
+ free(expect->if_not_defined);
if (expect->with_value)
free(expect->with_value);
if (expect->define_match)
@@ -2395,8 +2429,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
{
if (statuses[i].if_defined)
free(statuses[i].if_defined);
- if (statuses[i].if_undefined)
- free(statuses[i].if_undefined);
+ if (statuses[i].if_not_defined)
+ free(statuses[i].if_not_defined);
}
for (i = num_expects, expect = expects; i > 0; i --, expect ++)
@@ -2408,8 +2442,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
free(expect->same_count_as);
if (expect->if_defined)
free(expect->if_defined);
- if (expect->if_undefined)
- free(expect->if_undefined);
+ if (expect->if_not_defined)
+ free(expect->if_not_defined);
if (expect->with_value)
free(expect->with_value);
if (expect->define_match)
@@ -3035,6 +3069,19 @@ iso_date(ipp_uchar_t *date) /* I - IPP (RFC 1903) date/time value */
/*
+ * 'password_cb()' - Password callback for authenticated tests.
+ */
+
+static const char * /* O - Password */
+password_cb(const char *prompt) /* I - Prompt (unused) */
+{
+ (void)prompt;
+
+ return (Password);
+}
+
+
+/*
* 'print_attr()' - Print an attribute on the screen.
*/
@@ -4401,7 +4448,8 @@ validate_attr(ipp_attribute_t *attr, /* I - Attribute to validate */
static int /* O - 1 on match, 0 on non-match */
with_value(char *value, /* I - Value string */
int regex, /* I - Value is a regular expression */
- ipp_attribute_t *attr) /* I - Attribute to compare */
+ ipp_attribute_t *attr, /* I - Attribute to compare */
+ int report) /* I - 1 = report failures */
{
int i; /* Looping var */
char *valptr; /* Pointer into value */
@@ -4470,6 +4518,12 @@ with_value(char *value, /* I - Value string */
}
}
}
+
+ if (report)
+ {
+ for (i = 0; i < attr->num_values; i ++)
+ print_test_error("GOT: %s=%d", attr->name, attr->values[i].integer);
+ }
break;
case IPP_TAG_BOOLEAN :
@@ -4478,6 +4532,13 @@ with_value(char *value, /* I - Value string */
if (!strcmp(value, "true") == attr->values[i].boolean)
return (1);
}
+
+ if (report)
+ {
+ for (i = 0; i < attr->num_values; i ++)
+ print_test_error("GOT: %s=%s", attr->name,
+ attr->values[i].boolean ? "true" : "false");
+ }
break;
case IPP_TAG_NOVALUE :
@@ -4519,7 +4580,13 @@ with_value(char *value, /* I - Value string */
for (i = 0; i < attr->num_values; i ++)
{
if (regexec(&re, attr->values[i].string.text, 0, NULL, 0))
- break;
+ {
+ if (report)
+ print_test_error("GOT: %s=\"%s\"", attr->name,
+ attr->values[i].string.text);
+ else
+ break;
+ }
}
regfree(&re);
@@ -4538,6 +4605,13 @@ with_value(char *value, /* I - Value string */
if (!strcmp(value, attr->values[i].string.text))
return (1);
}
+
+ if (report)
+ {
+ for (i = 0; i < attr->num_values; i ++)
+ print_test_error("GOT: %s=\"%s\"", attr->name,
+ attr->values[i].string.text);
+ }
}
break;
diff --git a/test/print-job-media-col.test b/test/print-job-media-col.test
index 373825ab3..ed4f73b5d 100644
--- a/test/print-job-media-col.test
+++ b/test/print-job-media-col.test
@@ -25,6 +25,12 @@
MEMBER integer x-dimension 10160
MEMBER integer y-dimension 15240
}
+
+ # Borderless
+ MEMBER integer media-left-margin 0
+ MEMBER integer media-right-margin 0
+ MEMBER integer media-top-margin 0
+ MEMBER integer media-bottom-margin 0
}
FILE $filename
diff --git a/test/print-uri.test b/test/print-uri.test
new file mode 100644
index 000000000..aaa7d392e
--- /dev/null
+++ b/test/print-uri.test
@@ -0,0 +1,27 @@
+# Print a file using Print-URI
+{
+ # The name of the test...
+ NAME "Print file using Print-URI"
+
+ # The operation to use
+ OPERATION Print-URI
+
+ # 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
+ ATTR uri document-uri file://$filename
+
+ GROUP job-attributes-tag
+ ATTR integer copies 1
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+
+ # What attributes do we expect?
+ EXPECT job-id
+ EXPECT job-uri
+}
diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
index 013e4283b..1d0973b9d 100755
--- a/test/run-stp-tests.sh
+++ b/test/run-stp-tests.sh
@@ -651,7 +651,7 @@ fi
# Requests logged
count=`wc -l /tmp/cups-$user/log/access_log | awk '{print $1}'`
-expected=`expr 39 + 18 + $pjobs \* 8 + $pprinters \* $pjobs \* 4`
+expected=`expr 37 + 18 + $pjobs \* 8 + $pprinters \* $pjobs \* 4`
if test $count != $expected; then
echo "FAIL: $count requests logged, expected $expected."
echo "<P>FAIL: $count requests logged, expected $expected.</P>" >>$strfile