~ubuntu-branches/ubuntu/quantal/postgresql-common/quantal

« back to all changes in this revision

Viewing changes to t/050_encodings.t

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-06-14 14:52:08 UTC
  • Revision ID: james.westby@ubuntu.com-20110614145208-n9mlifxepd3w2rg7
Tags: 118
* Update Catalan debconf translations, thanks Innocent De Marchi.  
  (Closes: #628370)
* t/050_encodings.t: Update \' escaping test case for 9.1, as this
  finally has been deprecated.
* debian/control: Add p-server-dev-all dependency to p-common, so that
  packages that build-dep on it get the pg_config wrapper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
            'printf "set client_encoding=\'SJIS\'; select \'\\\\\\\'a\'" | psql -Atq template1',
85
85
            0, qr/(\\' is insecure)|(unterminated quoted string)/,
86
86
            'Server rejects \\\' escaping in unsafe client encoding (CVE-2006-2314)';
87
 
        is_program_out 'postgres', 
88
 
            "printf \"set client_encoding='UTF-8'; set escape_string_warning='off'; select '\\\\\\'a'\" | psql -Atq template1",
89
 
                0, "'a\n", 'Server accepts \\\' escaping in safe client encoding (CVE-2006-2314)';
 
87
        if ($v ge '9.1') {
 
88
            like_program_out 'postgres', 
 
89
                "printf \"set client_encoding='UTF-8'; set escape_string_warning='off'; select '\\\\\\'a'\" | psql -Atq template1",
 
90
                0, qr/unterminated quoted string/,
 
91
                'Server rejects obsolete \\\' escaping in unsafe client encoding (CVE-2006-2314)';
 
92
        } else {
 
93
            is_program_out 'postgres', 
 
94
                "printf \"set client_encoding='UTF-8'; set escape_string_warning='off'; select '\\\\\\'a'\" | psql -Atq template1",
 
95
                    0, "'a\n", 'Server accepts \\\' escaping in safe client encoding (CVE-2006-2314)';
 
96
        }
90
97
    }
91
98
 
92
99
    # drop cluster