mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
The problem is that relying on the output of the 'ls' command is not portable as its behavior is not the same between systems and it might even not be available at all in (Windows). So I added list_files that relies on the portable mysys library instead. (and also list_files_write_file and list_files_append_file, since the test was using '--exec ls' in that way.)
This commit is contained in:
@ -2117,10 +2117,22 @@ mkdir $MYSQLTEST_VARDIR/tmp/testdir;
|
||||
write_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt;
|
||||
hello
|
||||
EOF
|
||||
|
||||
list_files $MYSQLTEST_VARDIR/tmp/testdir;
|
||||
# list_files gets the directory list before creating the new file
|
||||
list_files_write_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir *;
|
||||
list_files_append_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir *2*;
|
||||
list_files_write_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir file?.txt;
|
||||
list_files_append_file $MYSQLTEST_VARDIR/tmp/testdir/file3.txt $MYSQLTEST_VARDIR/tmp/testdir file*.txt;
|
||||
diff_files $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir/file3.txt;
|
||||
--error 1
|
||||
rmdir $MYSQLTEST_VARDIR/tmp/testdir;
|
||||
|
||||
cat_file $MYSQLTEST_VARDIR/tmp/testdir/file3.txt;
|
||||
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/testdir/file3.txt;
|
||||
rmdir $MYSQLTEST_VARDIR/tmp/testdir;
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user