mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 04:02:09 +08:00
enhancement #ICU4Z3 优化 nodeid 不合法报错提示,增加错误引导
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.yomahub.liteflow.test.utils;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.yomahub.liteflow.util.QlExpressUtils;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* EL 工具类测试
|
||||
*
|
||||
* @author tangkc
|
||||
* @since 2.13.2
|
||||
*/
|
||||
public class QlExpressUtilsTest {
|
||||
|
||||
@Test
|
||||
public void checkVariableNameTest(){
|
||||
// 错误的
|
||||
Assert.isFalse(QlExpressUtils.checkVariableName(""));
|
||||
Assert.isFalse(QlExpressUtils.checkVariableName("11a"));
|
||||
Assert.isFalse(QlExpressUtils.checkVariableName("a-a"));
|
||||
// 正确的
|
||||
Assert.isTrue(QlExpressUtils.checkVariableName("aa"));
|
||||
Assert.isTrue(QlExpressUtils.checkVariableName("_aa"));
|
||||
Assert.isTrue(QlExpressUtils.checkVariableName("$aa"));
|
||||
Assert.isTrue(QlExpressUtils.checkVariableName("$a_a"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user