Skip to content

Commit 83eb481

Browse files
committed
Remove test-case workarounds for ancient libedit versions.
This reverts some hacks added in d33a812 and cd69ec6. At the time the concern was the already-ancient version of libedit shipped in Debian 10 (Buster). That platform is now two years past EOL, so desupporting it for PG 18 seems fine. (Also, if anyone is really hot to keep testing it, they can use SKIP_READLINE_TESTS to skip this test.) We might have to reconsider if any animals still in the buildfarm don't like this, but the best way to find out is to try it. Anton Melnikov Discussion: https://postgr.es/m/CAGRrpzZU48F2oV3d8eDLr=4TU9xFH5Jt9ED+qU1+X91gMH68Sw@mail.gmail.com
1 parent ddfc556 commit 83eb481

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

src/bin/psql/t/010_tab_completion.pl

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -167,26 +167,18 @@ sub clear_line
167167
qr/"mytab123" +"mytab246"/,
168168
"offer multiple quoted table choices");
169169

170-
# note: broken versions of libedit want to backslash the closing quote;
171-
# not much we can do about that
172-
check_completion("2\t", qr/246\\?" /,
170+
check_completion("2\t", qr/246" /,
173171
"finish completion of one of multiple quoted table choices");
174172

175-
# note: broken versions of libedit may leave us in a state where psql
176-
# thinks there's an unclosed double quote, so that we have to use
177-
# clear_line not clear_query here
178-
clear_line();
173+
clear_query();
179174

180175
# check handling of mixed-case names
181-
# note: broken versions of libedit want to backslash the closing quote;
182-
# not much we can do about that
183176
check_completion(
184177
"select * from \"mi\t",
185-
qr/"mixedName\\?" /,
178+
qr/"mixedName" /,
186179
"complete a mixed-case name");
187180

188-
# as above, must use clear_line not clear_query here
189-
clear_line();
181+
clear_query();
190182

191183
# check case folding
192184
check_completion("select * from TAB\t", qr/tab1 /, "automatically fold case");
@@ -198,8 +190,7 @@ sub clear_line
198190
# differently, so just check that the replacement comes out correctly
199191
check_completion("\\DRD\t", qr/drds /, "complete \\DRD<tab> to \\drds");
200192

201-
# broken versions of libedit require clear_line not clear_query here
202-
clear_line();
193+
clear_query();
203194

204195
# check completion of a schema-qualified name
205196
check_completion("select * from pub\t",
@@ -261,18 +252,16 @@ sub clear_line
261252
qr|tab_comp_dir/af\a?ile|,
262253
"filename completion with multiple possibilities");
263254

264-
# broken versions of libedit require clear_line not clear_query here
255+
# here we are inside a string literal 'afile*', so must use clear_line().
265256
clear_line();
266257

267258
# COPY requires quoting
268-
# note: broken versions of libedit want to backslash the closing quote;
269-
# not much we can do about that
270259
check_completion(
271260
"COPY foo FROM tab_comp_dir/some\t",
272-
qr|'tab_comp_dir/somefile\\?' |,
261+
qr|'tab_comp_dir/somefile' |,
273262
"quoted filename completion with one possibility");
274263

275-
clear_line();
264+
clear_query();
276265

277266
check_completion(
278267
"COPY foo FROM tab_comp_dir/af\t",

0 commit comments

Comments
 (0)