#!/usr/bin/perl -w use strict; use warnings; my $invert = shift; my %keep = map { chomp; $_ => 1 } ; my ($name, $type) = $invert ? ('Schema', 'schema-testing') : ('Core', 'assertion'); print qq{ -- This file defines pgTAP $name, a portable collection of $type -- functions for TAP-based unit testing on PostgreSQL 8.3 or higher. It is -- distributed under the revised FreeBSD license. The home page for the pgTAP -- project is: -- -- http://pgtap.org/ -- }; print "-- Requires pgtap-core.sql\n--\n" if $invert; my $print = 0; while (<>) { if (/^CREATE OR REPLACE \w+ (\w+)/) { if ($1 eq 'os_name' || $1 eq 'pg_typeof') { # Never keep this one. $print = 0; } elsif ($invert ? !$keep{$1} : $keep{$1}) { $print = 1; print; } else { $print = 0; } } else { print if $print; } } __DATA__ pg_version pg_version_num pgtap_version plan no_plan _get _get_latest _get_latest _get_note _get_note _set _set _set _add _add add_result num_failed _finish finish diag diag diag diag ok ok is is isnt isnt _alike matches matches imatches imatches alike alike ialike ialike _unalike doesnt_match doesnt_match doesnt_imatch doesnt_imatch unalike unalike unialike unialike cmp_ok cmp_ok cmp_ok cmp_ok pass pass fail fail todo todo todo todo todo_start todo_start in_todo todo_end _todo skip skip skip skip _query throws_ok throws_ok throws_ok throws_ok throws_ok throws_ok throws_ok lives_ok lives_ok performs_ok _ident_array_to_string tap_funky _got_func _got_func _got_func _got_func has_function has_function has_function has_function has_function has_function has_function has_function hasnt_function hasnt_function hasnt_function hasnt_function hasnt_function hasnt_function hasnt_function hasnt_function _pg_sv_type_array can can can can _has_type _has_type has_type has_type has_type has_type hasnt_type hasnt_type hasnt_type hasnt_type has_domain has_domain has_domain has_domain hasnt_domain hasnt_domain hasnt_domain hasnt_domain has_enum has_enum has_enum has_enum hasnt_enum hasnt_enum hasnt_enum hasnt_enum enum_has_labels enum_has_labels enum_has_labels enum_has_labels display_type display_type _cmp_types _cast_exists _cast_exists _cast_exists has_cast has_cast has_cast has_cast has_cast has_cast hasnt_cast hasnt_cast hasnt_cast hasnt_cast hasnt_cast hasnt_cast _expand_context _get_context cast_context_is cast_context_is _op_exists _op_exists _op_exists has_operator has_operator has_operator has_operator has_operator has_operator has_leftop has_leftop has_leftop has_leftop has_leftop has_leftop has_rightop has_rightop has_rightop has_rightop has_rightop has_rightop _is_trusted has_language has_language hasnt_language hasnt_language language_is_trusted language_is_trusted _opc_exists has_opclass has_opclass has_opclass has_opclass hasnt_opclass hasnt_opclass hasnt_opclass hasnt_opclass _nosuch _func_compare _func_compare _func_compare _func_compare _lang _lang _lang _lang function_lang_is function_lang_is function_lang_is function_lang_is function_lang_is function_lang_is function_lang_is function_lang_is _returns _returns _returns _returns function_returns function_returns function_returns function_returns function_returns function_returns function_returns function_returns _definer _definer _definer _definer is_definer is_definer is_definer is_definer is_definer is_definer is_definer is_definer _agg _agg _agg _agg is_aggregate is_aggregate is_aggregate is_aggregate is_aggregate is_aggregate is_aggregate is_aggregate _strict _strict _strict _strict is_strict is_strict is_strict is_strict is_strict is_strict is_strict is_strict _expand_vol _refine_vol _vol _vol _vol _vol volatility_is volatility_is volatility_is volatility_is volatility_is volatility_is volatility_is volatility_is findfuncs findfuncs _runem _is_verbose do_tap do_tap do_tap do_tap _currtest _cleanup _runner runtests runtests runtests runtests _temptable _temptable _temptypes _docomp _relcomp _relcomp set_eq set_eq set_eq set_eq bag_eq bag_eq bag_eq bag_eq _do_ne _relne _relne set_ne set_ne set_ne set_ne bag_ne bag_ne bag_ne bag_ne _relcomp set_has set_has bag_has bag_has set_hasnt set_hasnt bag_hasnt bag_hasnt results_eq results_eq results_eq results_eq results_eq results_eq results_eq results_eq results_eq results_eq results_eq results_eq results_ne results_ne results_ne results_ne results_ne results_ne results_ne results_ne results_ne results_ne results_ne results_ne isa_ok isa_ok is_empty is_empty collect_tap _tlike throws_like throws_like throws_ilike throws_ilike throws_matching throws_matching throws_imatching throws_imatching _dexists _dexists _get_dtype _get_dtype domain_type_is domain_type_is domain_type_is domain_type_is domain_type_is domain_type_is domain_type_isnt domain_type_isnt domain_type_isnt domain_type_isnt domain_type_isnt domain_type_isnt row_eq row_eq