Skip to content

Commit

Permalink
Add a SKIPIF section to skip tests when Structures_LinkedList is not …
Browse files Browse the repository at this point in the history
…installed

git-svn-id: https://svn.php.net/repository/pear/packages/File_MARC/trunk@302402 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
Dan Scott committed Aug 17, 2010
1 parent d764377 commit d44164b
Show file tree
Hide file tree
Showing 37 changed files with 87 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions tests/marc_006.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_006: test read.php
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php

Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions tests/marc_xml_006.phpt
@@ -1,5 +1,7 @@
--TEST--
marc_xml_006: test getFields() in XML
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php

Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
2 changes: 2 additions & 0 deletions 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__);
Expand Down
15 changes: 15 additions & 0 deletions 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);

?>

0 comments on commit d44164b

Please sign in to comment.