File: gencore

package info (click to toggle)
pgtap 1.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,792 kB
  • sloc: sql: 25,795; sh: 790; makefile: 287; perl: 175
file content (186 lines) | stat: -rw-r--r-- 2,433 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#!/usr/bin/perl -w

use strict;
use warnings;

my $invert = shift;
my %keep = map { chomp; $_ => 1 } <DATA>;
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 9.1 or higher. It is
-- distributed under the revised FreeBSD license. The home page for the pgTAP
-- project is:

--
-- https://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_note
_set
_add
add_result
num_failed
_finish
finish
diag
diag_test_name
ok
is
isnt
_alike
matches
imatches
alike
ialike
_unalike
doesnt_match
doesnt_imatch
unalike
unialike
cmp_ok
pass
fail
todo
todo_start
in_todo
todo_end
_todo
skip
_query
throws_ok
lives_ok
performs_ok
performs_within
_time_trial_type
_time_trials
_ident_array_to_string
_prokind
tap_funky
_funkargs
_got_func
has_function
hasnt_function
_pg_sv_type_array
can
_has_type
has_type
hasnt_type
has_domain
hasnt_domain
has_enum
hasnt_enum
enum_has_labels
display_type
_cmp_types
_cast_exists
has_cast
hasnt_cast
_expand_context
_get_context
cast_context_is
_op_exists
has_operator
has_leftop
has_rightop
_is_trusted
has_language
hasnt_language
language_is_trusted
_opc_exists
has_opclass
hasnt_opclass
_nosuch
_func_compare
_lang
function_lang_is
_returns
function_returns
_definer
is_definer
isnt_definer
_type_func
is_aggregate
isnt_aggregate
is_normal_function
isnt_normal_function
is_window
isnt_window
is_procedure
isnt_procedure
_strict
is_strict
isnt_strict
_expand_vol
_refine_vol
_vol
volatility_is
findfuncs
_runem
_is_verbose
do_tap
_currtest
_cleanup
_runner
runtests
_temptable
_temptypes
_docomp
_relcomp
set_eq
bag_eq
_do_ne
_relne
set_ne
bag_ne
set_has
bag_has
set_hasnt
bag_hasnt
results_eq
results_ne
isa_ok
is_empty
collect_tap
_tlike
throws_like
throws_ilike
throws_matching
throws_imatching
_dexists
_get_dtype
domain_type_is
domain_type_isnt
row_eq
_error_diag