Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a SKIPIF section to skip tests when Structures_LinkedList is not …

…installed

git-svn-id: https://svn.php.net/repository/pear/packages/File_MARC/trunk@302402 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit d44164b1b36057f1f814a55cbfda87e896eeabea 1 parent d764377
Dan Scott authored
Showing with 87 additions and 0 deletions.
  1. +2 −0  tests/marc_001.phpt
  2. +2 −0  tests/marc_002.phpt
  3. +2 −0  tests/marc_003.phpt
  4. +2 −0  tests/marc_004.phpt
  5. +2 −0  tests/marc_005.phpt
  6. +2 −0  tests/marc_006.phpt
  7. +2 −0  tests/marc_007.phpt
  8. +2 −0  tests/marc_008.phpt
  9. +2 −0  tests/marc_009.phpt
  10. +2 −0  tests/marc_010.phpt
  11. +2 −0  tests/marc_011.phpt
  12. +2 −0  tests/marc_012.phpt
  13. +2 −0  tests/marc_013.phpt
  14. +2 −0  tests/marc_014.phpt
  15. +2 −0  tests/marc_015.phpt
  16. +2 −0  tests/marc_016.phpt
  17. +2 −0  tests/marc_017.phpt
  18. +2 −0  tests/marc_018.phpt
  19. +2 −0  tests/marc_16783.phpt
  20. +2 −0  tests/marc_field_001.phpt
  21. +2 −0  tests/marc_field_002.phpt
  22. +2 −0  tests/marc_field_003.phpt
  23. +2 −0  tests/marc_field_004.phpt
  24. +2 −0  tests/marc_record_001.phpt
  25. +2 −0  tests/marc_subfield_001.phpt
  26. +2 −0  tests/marc_subfield_002.phpt
  27. +2 −0  tests/marc_xml_001.phpt
  28. +2 −0  tests/marc_xml_002.phpt
  29. +2 −0  tests/marc_xml_003.phpt
  30. +2 −0  tests/marc_xml_004.phpt
  31. +2 −0  tests/marc_xml_005.phpt
  32. +2 −0  tests/marc_xml_006.phpt
  33. +2 −0  tests/marc_xml_007.phpt
  34. +2 −0  tests/marc_xml_008.phpt
  35. +2 −0  tests/marc_xml_16642.phpt
  36. +2 −0  tests/marc_xml_rsinger.phpt
  37. +15 −0 tests/skipif.inc
View
2  tests/marc_001.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_001: iterate and pretty print a MARC record
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_002.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_002: iterate and pretty print MARC records from a file with multiple records
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_003.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_003: getFields() with various regular expressions
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_004.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_004: Delete fields and subfields
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_005.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_005: Ensure a duplicated record is a deep copy; test deleteFields()
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_006.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_006: test read.php
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
View
2  tests/marc_007.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_007: Use key=>value iteration for tags and codes
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_008.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_008: Attempt to open a file that does not exist
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_009.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_009: Parse a record where leader record length != real record length
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_010.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_001: iterate and pretty print a MARC record
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_011.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_011: iterate and pretty print a MARC record (SOURCE_STRING)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_012.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_012: test isControlField() and isDataField() convenience methods
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_013.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_013: test formatField() convenience method
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_014.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_014: Add fields to a MARC record
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_015.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_015: ensure that pandemonium does not occur if a record doesn't have a given field
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_016.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_016: generate a single collection of MARCXML records from a MARC record
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_017.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_017: iterate and print a MARC record to JSON format
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_018.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_018: iterate and print a MARC record to JSON MARC-HASH format
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_16783.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_16783: iterate and pretty print a non-compliant MARC record (tag = '30-')
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_field_001.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_field_001: Exercise basic methods for File_MARC_Field class
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_field_002.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_field_002: Create fields with invalid indicators
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_field_003.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_field_003: Add subfields to an existing field
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_field_004.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_field_004: Add subfields to an existing field (corner case)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_record_001.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_record_001: create a MARC record from scratch
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_subfield_001.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_subfield_001: Exercise basic methods for File_MARC_Subfield class
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_subfield_002.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_subfield_002: Exercise setter and isEmpty() methods for File_MARC_Subfield class
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_xml_001.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_001: iterate and pretty print a MARC record
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_xml_002.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_002: iterate and pretty print a MARC record (LOC standard)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_xml_003.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_003: Round-trip a MARCXML record to MARC21 (LOC standard)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_xml_004.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_004: test conversion to XML of subfields that need to be escaped
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_xml_005.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_005: Round-trip a MARCXML record with a root element of "record" to MARC21
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_xml_006.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_006: test getFields() in XML
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
View
2  tests/marc_xml_007.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_007: test getTag(), isControlField(), and isDataField() convenience methods on MARCXML
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_xml_008.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_008: generate a single collection of MARCXML records from a MARCXML record
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_xml_16642.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_16642: Fix bug 16642: ensure tag and subfield values are returned as strings
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
2  tests/marc_xml_rsinger.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_rsinger: iterate and pretty print a non-compliant MARC record (tag = '30-', missing indicator in 245)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
View
15 tests/skipif.inc
@@ -0,0 +1,15 @@
+<?php
+
+// Stash the current error_reporting value
+$error_reporting = error_reporting();
+
+// Disable warnings for the include_once() test
+error_reporting(E_ALL && ~E_WARNING);
+if (!include_once('Structures/LinkedList/Double.php')) {
+ print("skip - Structures_LinkedList PEAR package is not installed.");
+}
+
+// Restore the error reporting to previous value
+error_reporting($error_reporting);
+
+?>
Please sign in to comment.
Something went wrong with that request. Please try again.