12345678910111213 |
- /**
- * Created by CSL on 2017-09-01.
- */
- var test = require('tape');
- import analyzer from '../../public/calc_util';
- test('解析测试', function(t){
- let userExpr = "12 +[人工费]*1.2+f4+ (F6+ f10) +F23+[人工费] + f6+[材料费]";
- let rst = analyzer.analyzeUserExpr(userExpr);
- console.log(rst);
- t.equal(rst, "12+@('111')*1.2+@('5')+(@('7')+@('11'))+@('24')+@('111')+@('7')+@('222')");
- t.end();
- });
|