mirror of
https://github.com/tstack/lnav.git
synced 2024-08-17 00:40:30 +03:00
[tests] add test for realpath()
This commit is contained in:
parent
47fb48eaf3
commit
5c02766485
@ -111,6 +111,10 @@ check_output_ws() {
|
||||
test_num=`expr ${test_num} \+ 1`
|
||||
}
|
||||
|
||||
test_filename() {
|
||||
echo ${test_file_base}_${test_num}.tmp
|
||||
}
|
||||
|
||||
test_err_filename() {
|
||||
echo ${test_file_base}_${test_num}.err
|
||||
}
|
||||
|
@ -15,6 +15,17 @@ Row 0:
|
||||
Column readlink('sql_fs_readlink_test.lnk'): sql_fs_readlink_test
|
||||
EOF
|
||||
|
||||
ln -sf drive_sql sql_fs_realpath_test.lnk
|
||||
run_test ./drive_sql "select realpath('sql_fs_realpath_test.lnk')"
|
||||
rm sql_fs_realpath_test.lnk
|
||||
|
||||
sed -e "s|${builddir}|<build_dir>|g" `test_filename` > test_realpath.out
|
||||
mv test_realpath.out `test_filename`
|
||||
check_output "realpath() does not work?" <<EOF
|
||||
Row 0:
|
||||
Column realpath('sql_fs_realpath_test.lnk'): <build_dir>/drive_sql
|
||||
EOF
|
||||
|
||||
run_test ./drive_sql "select basename('')"
|
||||
|
||||
check_output "basename('') is not '.'" <<EOF
|
||||
|
Loading…
Reference in New Issue
Block a user