~kiwec/ke

ref: 1cc8481dfedc9af3516f171e159069587e300d3b ke/test/Syntax.cc -rw-r--r-- 467 bytes
1cc8481d — Wolf Clément Fix compilation 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.h"

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

#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);
  }
}