]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/testpwg.c
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / cups / testpwg.c
index dfa9f402acd677e6298d599ed79d073d9a6a35c0..6473c8cf91ff3b52e012d22e7325b10eeb3c0a55 100644 (file)
@@ -1,23 +1,9 @@
 /*
- * "$Id$"
+ * PWG unit test program for CUPS.
  *
- *   PWG test program for CUPS.
+ * Copyright 2009-2016 by Apple Inc.
  *
- *   Copyright 2009-2013 by Apple Inc.
- *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   which should have been included with this file.  If this file is
- *   file is missing or damaged, see the license at "http://www.cups.org/".
- *
- *   This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- *   main()           - Main entry.
- *   test_pagesize()  - Test the PWG mapping functions.
- *   test_ppd_cache() - Test the PPD cache functions.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
  */
 
 /*
@@ -188,6 +174,20 @@ main(int  argc,                            /* I - Number of command-line args */
   else
     printf("PASS (%dx%d)\n", pwgmedia->width, pwgmedia->length);
 
+  fputs("pwgMediaForPWG(\"disc_test_10x100mm\"): ", stdout);
+  if ((pwgmedia = pwgMediaForPWG("disc_test_10x100mm")) == NULL)
+  {
+    puts("FAIL (not found)");
+    status ++;
+  }
+  else if (pwgmedia->width != 10000 || pwgmedia->length != 10000)
+  {
+    printf("FAIL (%dx%d)\n", pwgmedia->width, pwgmedia->length);
+    status ++;
+  }
+  else
+    printf("PASS (%dx%d)\n", pwgmedia->width, pwgmedia->length);
+
   fputs("pwgMediaForLegacy(\"na-letter\"): ", stdout);
   if ((pwgmedia = pwgMediaForLegacy("na-letter")) == NULL)
   {
@@ -563,8 +563,3 @@ test_ppd_cache(_ppd_cache_t *pc,    /* I - PWG mapping data */
 
   return (status);
 }
-
-
-/*
- * End of "$Id$".
- */