Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1017846 // Test matchDollarVarsIC_underscores (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (7213L/51K).

1  
!7
2  
3  
p-exp {
4  
  assertEqualsVerbose(litorderedmap("$x", "Federer", "$y", "someone"), matchDollarVarsIC_underscores("$x and $y play a game of...", "Federer and someone play a game of..."));
5  
6  
  assertEqualsVerbose(litmap("$bla", "hello"), matchDollarVarsIC_underscores("$bla", "hello"));
7  
  assertEqualsVerbose(null, matchDollarVarsIC_underscores("$bla", "hello you"));
8  
  assertEqualsVerbose(litmap("$bla_bla", "hello you"), matchDollarVarsIC_underscores("$bla_bla", "hello you"));
9  
  assertEqualsVerbose(null, matchDollarVarsIC_underscores("$bla_bla", "hello"));
10  
  assertEqualsVerbose(litmap("$bla", "hello"), matchDollarVarsIC_underscores("$_q_bla", quote("hello")));
11  
  
12  
  // ignoring word count for quoted vars
13  
  assertEqualsVerbose(litmap("$bla_bla", "hello"), matchDollarVarsIC_underscores("$_q_bla_bla", quote("hello")));
14  
  assertEqualsVerbose(litmap("$bla", "hello you"), matchDollarVarsIC_underscores("$_q_bla", quote("hello you")));
15  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017846
Snippet name: Test matchDollarVarsIC_underscores (OK)
Eternal ID of this version: #1017846/10
Text MD5: b843bba6c10319f1f46ce48f20bf96cd
Transpilation MD5: d87da583e4c2b8f65a041038e13b44f6
Author: stefan
Category: javax / parsing
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-20 19:20:07
Source code size: 951 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 297 / 879
Version history: 9 change(s)
Referenced in: [show references]