Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8423bf4

Browse files
committed
chkpass: Add test suite
Reviewed-by: David Steele <david@pgmasters.net>
1 parent4cb89d8 commit8423bf4

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

‎contrib/chkpass/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Generated subdirectories
2+
/log/
3+
/results/
4+
/tmp_check/

‎contrib/chkpass/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ PGFILEDESC = "chkpass - encrypted password data type"
99

1010
SHLIB_LINK =$(filter -lcrypt,$(LIBS))
1111

12+
REGRESS = chkpass
13+
1214
ifdefUSE_PGXS
1315
PG_CONFIG = pg_config
1416
PGXS :=$(shell$(PG_CONFIG) --pgxs)

‎contrib/chkpass/expected/chkpass.out

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
CREATE EXTENSION chkpass;
2+
WARNING: type input function chkpass_in should not be volatile
3+
CREATE TABLE test (i int, p chkpass);
4+
INSERT INTO test VALUES (1, 'hello'), (2, 'goodbye');
5+
SELECT i, p = 'hello' AS "hello?" FROM test;
6+
i | hello?
7+
---+--------
8+
1 | t
9+
2 | f
10+
(2 rows)
11+
12+
SELECT i, p <> 'hello' AS "!hello?" FROM test;
13+
i | !hello?
14+
---+---------
15+
1 | f
16+
2 | t
17+
(2 rows)
18+

‎contrib/chkpass/sql/chkpass.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CREATE EXTENSION chkpass;
2+
3+
CREATETABLEtest (iint, p chkpass);
4+
INSERT INTO testVALUES (1,'hello'), (2,'goodbye');
5+
6+
SELECT i, p='hello'AS"hello?"FROM test;
7+
SELECT i, p<>'hello'AS"!hello?"FROM test;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp