test002.ksh
来自「b树实现源码,linux和unix下运行,速度快,极好用」· KSH 代码 · 共 67 行
KSH
67 行
#!/bin/sh# Test Case# check options l, i, d, T, I with empty database# check options D with trans, lock and non existing structure name# check behaviour when multiple options are given togetherecho "Case 1: With l option:"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -lif [ $? -ne 0 ]then exit 1;fiecho "Case 2: With i option:"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -iif [ $? -ne 0 ]then exit 2;fiecho "Case 3: With d option:"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -dif [ $? -ne 0 ]then exit 3;fiecho "Case 4: With nonexisting tablename on -T option :" $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -T t1 2>/tmp/tmptstlogif [ $? -eq 0 ]then exit 4;fiecho "Case 5: With nonexisting indexname on -I option :" $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -I idx1 2>/tmp/tmptstlogif [ $? -eq 0 ]then exit 5;fiecho "Case 6: With trans on D option:"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -D transif [ $? -ne 0 ]then exit 6;fiecho "Case 7: With lock on D option:"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -D lockif [ $? -ne 0 ]then exit 7;fiecho "Case 8: With nonexisting structure on D option:"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -D notexistif [ $? -eq 0 ]then exit 8;fiecho "Case 9: With two options:"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -d -lif [ $? -ne 0 ]then exit 9;fiexit 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?