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

20
LINES

< > BotCompany Repo | #1030025 // test_parseColonHeadingSections (OK)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4619L/30K).

svoid test_parseColonHeadingSections() {
  S input = autoUnindent_mls([[
    Prelude
    
    Inputs: 
    
    "Where is the code repository?"
    "Where is the fork?"
    
    Expected output:
    
    "Where is the *?"
  ]]);

  SS map = parseColonHeadingSections(input);
  assertEqualsVerbose(ll("", "Inputs", "Expected output"), keysList(map));
  assertEqualsVerbose_struct("Prelude", trim(map.get("")));
  assertEqualsVerbose_struct("\"Where is the code repository?\"\n\"Where is the fork?\"", trim(map.get("Inputs")));
  assertEqualsVerbose_struct("\"Where is the *?\"", trim(map.get("Expected output")));
}

Author comment

Began life as a copy of #1027382

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030025
Snippet name: test_parseColonHeadingSections (OK)
Eternal ID of this version: #1030025/5
Text MD5: 4de339408d230ffc6ec95227bd4d460d
Transpilation MD5: 15afe74dad5583cd3b064ad8d9f27494
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-10-30 11:23:10
Source code size: 633 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 152 / 221
Version history: 4 change(s)
Referenced in: [show references]