mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
chkpass: Add test suite
Reviewed-by: David Steele <david@pgmasters.net>
This commit is contained in:
parent
4cb89d8306
commit
8423bf4f25
4
contrib/chkpass/.gitignore
vendored
Normal file
4
contrib/chkpass/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Generated subdirectories
|
||||
/log/
|
||||
/results/
|
||||
/tmp_check/
|
@ -9,6 +9,8 @@ PGFILEDESC = "chkpass - encrypted password data type"
|
||||
|
||||
SHLIB_LINK = $(filter -lcrypt, $(LIBS))
|
||||
|
||||
REGRESS = chkpass
|
||||
|
||||
ifdef USE_PGXS
|
||||
PG_CONFIG = pg_config
|
||||
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
||||
|
18
contrib/chkpass/expected/chkpass.out
Normal file
18
contrib/chkpass/expected/chkpass.out
Normal file
@ -0,0 +1,18 @@
|
||||
CREATE EXTENSION chkpass;
|
||||
WARNING: type input function chkpass_in should not be volatile
|
||||
CREATE TABLE test (i int, p chkpass);
|
||||
INSERT INTO test VALUES (1, 'hello'), (2, 'goodbye');
|
||||
SELECT i, p = 'hello' AS "hello?" FROM test;
|
||||
i | hello?
|
||||
---+--------
|
||||
1 | t
|
||||
2 | f
|
||||
(2 rows)
|
||||
|
||||
SELECT i, p <> 'hello' AS "!hello?" FROM test;
|
||||
i | !hello?
|
||||
---+---------
|
||||
1 | f
|
||||
2 | t
|
||||
(2 rows)
|
||||
|
7
contrib/chkpass/sql/chkpass.sql
Normal file
7
contrib/chkpass/sql/chkpass.sql
Normal file
@ -0,0 +1,7 @@
|
||||
CREATE EXTENSION chkpass;
|
||||
|
||||
CREATE TABLE test (i int, p chkpass);
|
||||
INSERT INTO test VALUES (1, 'hello'), (2, 'goodbye');
|
||||
|
||||
SELECT i, p = 'hello' AS "hello?" FROM test;
|
||||
SELECT i, p <> 'hello' AS "!hello?" FROM test;
|
Loading…
x
Reference in New Issue
Block a user