+ [misc] run getExpression unit test.

This commit is contained in:
qixinzhi
2024-09-04 16:10:43 +08:00
committed by 代婷婷
parent 573be49114
commit e53f3cba25
+11 -1
View File
@@ -9,6 +9,16 @@ title=biModel->getExpression();
timeout=0
cid=1
- 测试 * @*
- 测试 id @`id`
- 测试 t1.id @`t1`.`id`
- 测试 t1.* @`t1`.*
- 测试 id as project @`id` AS `project`
- 测试 t1.id as project @`t1`.`id` AS `project`
- 测试 year(date) @YEAR(`date`)
- 测试 year(date) as year @YEAR(`date`) AS `year`
- 测试 year(t1.date) as year @YEAR(`t1`.`date`) AS `year`
*/
$bi = new biTest();
@@ -20,4 +30,4 @@ r($bi->getExpressionTest(null, 'id', 'project')) && p('') && e('`id` AS `
r($bi->getExpressionTest('t1', 'id', 'project')) && p('') && e('`t1`.`id` AS `project`'); // 测试 t1.id as project
r($bi->getExpressionTest(null, 'date', null, 'year')) && p('') && e('YEAR(`date`)'); // 测试 year(date)
r($bi->getExpressionTest(null, 'date', 'year', 'year')) && p('') && e('YEAR(`date`) AS `year`'); // 测试 year(date) as year
r($bi->getExpressionTest('t1', 'date', 'year', 'year')) && p('') && e('YEAR(`t1`.`date`) AS `year`'); // 测试 year(t1.date) as year
r($bi->getExpressionTest('t1', 'date', 'year', 'year')) && p('') && e('YEAR(`t1`.`date`) AS `year`'); // 测试 year(t1.date) as year