-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #316 from alibaba/fix_commit_with_invalid_number
修复注释解析问题
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.ql.util.express.bugfix; | ||
|
||
import com.ql.util.express.DefaultContext; | ||
import com.ql.util.express.ExpressRunner; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Author: DQinYuan | ||
*/ | ||
public class CommentTest { | ||
|
||
@Test | ||
public void invalidNumInCommitTest() throws Exception { | ||
ExpressRunner runner = new ExpressRunner(true, false); | ||
DefaultContext<String, Object> context = new DefaultContext<>(); | ||
// 定义表达式 | ||
String express = "/** 2倍 **/ 1+1"; | ||
Object result = runner.execute(express, context, null, true, true); | ||
Assert.assertEquals(2, result); | ||
} | ||
|
||
} |