]> granicus.if.org Git - postgresql/commitdiff
Fix the new SASLprep tests to work with non-UTF-8 locales.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sat, 8 Apr 2017 10:32:38 +0000 (13:32 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sat, 8 Apr 2017 10:32:38 +0000 (13:32 +0300)
Fix by forcing database encoding to UTF-8, regardless of the current
locale.

Pointed out by Tom Lane.

Discussion: https://www.postgresql.org/message-id/8934.1491614631@sss.pgh.pa.us

src/test/authentication/t/002_saslprep.pl

index 0c18528e7afc5e928f0d422ada3de1a2c52ec11c..7e373ed7bf4ca0ad3f713bef9aa6178bfb49f3cf 100644 (file)
@@ -42,9 +42,10 @@ SKIP:
 {
        skip "authentication tests cannot run on Windows", 12 if ($windows_os);
 
-       # Initialize master node
+       # Initialize master node. Force UTF-8 encoding, so that we can use non-ASCII
+       # characters in the passwords below.
        my $node = get_new_node('master');
-       $node->init;
+       $node->init(extra => ['--locale=C', '--encoding=UTF8']);
        $node->start;
 
        # These tests are based on the example strings from RFC4013.txt,