1
0
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:
Mattias Jonsson
2008-07-09 13:19:04 +02:00
parent b3a29b428e
commit e438f9f29d
18 changed files with 5557 additions and 5416 deletions

View File

@ -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;
#