git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2111a48)
pg_resetwal: Add simple test suite
2018年3月23日 12:42:25 +0000 (08:42 -0400)
2018年3月23日 12:42:25 +0000 (08:42 -0400)
Some subsequent patches will add to this, but to avoid conflicts, set up
the basics separately.

src/bin/pg_resetwal/t/001_basic.pl [new file with mode: 0644] patch | blob

diff --git a/src/bin/pg_resetwal/.gitignore b/src/bin/pg_resetwal/.gitignore
index 236abb4323c41671351cf603aa9aa653593a1bd6..56bade5ea44010db58bb283c23888dcab3f9a47f 100644 (file)
--- a/src/bin/pg_resetwal/.gitignore
+++ b/src/bin/pg_resetwal/.gitignore
@@ -1 +1,2 @@
/pg_resetwal
+/tmp_check/
diff --git a/src/bin/pg_resetwal/Makefile b/src/bin/pg_resetwal/Makefile
index 5ab7ad33e0ae6a0d3600fff6e912c8dd5162e2b5..e49d52b92885759cf09a7a31963c3e147f9f77f2 100644 (file)
--- a/src/bin/pg_resetwal/Makefile
+++ b/src/bin/pg_resetwal/Makefile
@@ -33,3 +33,10 @@ uninstall:
clean distclean maintainer-clean:
rm -f pg_resetwal$(X) $(OBJS)
+ rm -rf tmp_check
+
+check:
+ $(prove_check)
+
+installcheck:
+ $(prove_installcheck)
diff --git a/src/bin/pg_resetwal/t/001_basic.pl b/src/bin/pg_resetwal/t/001_basic.pl
new file mode 100644 (file)
index 0000000..1b157cb
--- /dev/null
+++ b/src/bin/pg_resetwal/t/001_basic.pl
@@ -0,0 +1,17 @@
+use strict;
+use warnings;
+
+use PostgresNode;
+use TestLib;
+use Test::More tests => 11;
+
+program_help_ok('pg_resetwal');
+program_version_ok('pg_resetwal');
+program_options_handling_ok('pg_resetwal');
+
+my $node = get_new_node('main');
+$node->init;
+
+command_like([ 'pg_resetwal', '-n', $node->data_dir ],
+ qr/checkpoint/,
+ 'pg_resetwal -n produces output');
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /