~kiwec/ke

ref: 2133c126a17a4627ffb76143c19c287e9c272749 ke/test/Syntax.cc -rw-r--r-- 475 bytes
2133c126 — Wolf Clément Add error, info and success messages 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "Syntax.hpp"

#include "../src/Document.hpp"
#include "../src/Line.hpp"
#include "../src/Section.hpp"

#include <stdio.h>

void test_syntax_inline_matches() {
  {
    TestLine line(L"there are three spaces");
    auto matches = Syntax::get_inline_matches(line, L" ");
    TEST_CHECK(matches.size() == 3);
  }
  
  {
    TestLine line(L"// multichar // matches");
    auto matches = Syntax::get_inline_matches(line, L"//");
    TEST_CHECK(matches.size() == 2);
  }
}