7070# to run in the build directory so that we can use relative paths to
7171# access the tmp_check subdirectory; otherwise the output from filename
7272# completion tests is too variable.
73- if ($ENV {TESTDIR })
73+ if ($ENV {TESTOUTDIR })
7474{
75- chdir $ENV {TESTDIR } or die " could not chdir to \" $ENV {TESTDIR }\" : $! " ;
75+ chdir " $ENV {TESTOUTDIR} " or die " could not chdir to \" $ENV {TESTOUTDIR }\" : $! " ;
7676}
7777
7878# Create some junk files for filename completion testing.
7979my $FH ;
80- open $FH , " >" , " tmp_check/ somefile"
81- or die (" could not create file \" tmp_check/ somefile\" : $! " );
80+ open $FH , " >" , " somefile"
81+ or die (" could not create file \" somefile\" : $! " );
8282print $FH " some stuff\n " ;
8383close $FH ;
84- open $FH , " >" , " tmp_check/ afile123"
85- or die (" could not create file \" tmp_check/ afile123\" : $! " );
84+ open $FH , " >" , " afile123"
85+ or die (" could not create file \" afile123\" : $! " );
8686print $FH " more stuff\n " ;
8787close $FH ;
88- open $FH , " >" , " tmp_check/ afile456"
89- or die (" could not create file \" tmp_check/ afile456\" : $! " );
88+ open $FH , " >" , " afile456"
89+ or die (" could not create file \" afile456\" : $! " );
9090print $FH " other stuff\n " ;
9191close $FH ;
9292
@@ -272,16 +272,16 @@ sub clear_line
272272
273273# check filename completion
274274check_completion(
275- " \\ lo_import tmp_check/ some\t " ,
276- qr |tmp_check/ somefile | ,
275+ " \\ lo_import some\t " ,
276+ qr | somefile | ,
277277 " filename completion with one possibility" );
278278
279279clear_query();
280280
281281# note: readline might print a bell before the completion
282282check_completion(
283- " \\ lo_import tmp_check/ af\t " ,
284- qr |tmp_check/ af\a ?ile| ,
283+ " \\ lo_import af\t " ,
284+ qr | af\a ?ile| ,
285285 " filename completion with multiple possibilities" );
286286
287287# broken versions of libedit require clear_line not clear_query here
@@ -291,23 +291,23 @@ sub clear_line
291291# note: broken versions of libedit want to backslash the closing quote;
292292# not much we can do about that
293293check_completion(
294- " COPY foo FROM tmp_check/ some\t " ,
295- qr | 'tmp_check/ somefile\\ ?' | ,
294+ " COPY foo FROM some\t " ,
295+ qr | 'somefile\\ ?' | ,
296296 " quoted filename completion with one possibility" );
297297
298298clear_line();
299299
300300check_completion(
301- " COPY foo FROM tmp_check/ af\t " ,
302- qr | 'tmp_check/ afile| ,
301+ " COPY foo FROM af\t " ,
302+ qr | 'afile| ,
303303 " quoted filename completion with multiple possibilities" );
304304
305305# some versions of readline/libedit require two tabs here, some only need one
306306# also, some will offer the whole path name and some just the file name
307307# the quotes might appear, too
308308check_completion(
309309 " \t\t " ,
310- qr | afile123'? +'?(tmp_check/)? afile456| ,
310+ qr | afile123'? +'?afile456| ,
311311 " offer multiple file choices" );
312312
313313clear_line();
0 commit comments