mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:36:22 -04:00
Rename spec -> test
'Test' is a lot more straightforward of a name.
This commit is contained in:
parent
7d8daf573e
commit
6dc0ff359d
|
|
@ -1,5 +1,5 @@
|
||||||
-Isrc
|
-Isrc
|
||||||
-Ispec
|
-Itest
|
||||||
-Iinclude
|
-Iinclude
|
||||||
-Iexternals/utf8proc
|
-Iexternals/utf8proc
|
||||||
-Iexternals/json-parser
|
-Iexternals/json-parser
|
||||||
|
|
|
||||||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -6,10 +6,10 @@ Makefile
|
||||||
*.target.mk
|
*.target.mk
|
||||||
*.xcodeproj
|
*.xcodeproj
|
||||||
|
|
||||||
spec/run.out*
|
test/run.out*
|
||||||
externals/cpplint.py
|
externals/cpplint.py
|
||||||
out
|
out
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
||||||
spec/fixtures/grammars/*
|
test/fixtures/grammars/*
|
||||||
!spec/fixtures/grammars/.gitkeep
|
!test/fixtures/grammars/.gitkeep
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
GRAMMARS_DIR=$(dirname $0)/../spec/fixtures/grammars
|
GRAMMARS_DIR=$(dirname $0)/../test/fixtures/grammars
|
||||||
|
|
||||||
fetch_grammar() {
|
fetch_grammar() {
|
||||||
local grammar=$1
|
local grammar=$1
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ case ${mode} in
|
||||||
--dsymutil=yes \
|
--dsymutil=yes \
|
||||||
--leak-check=${leak_check} \
|
--leak-check=${leak_check} \
|
||||||
$cmd "${args[@]}" 2>&1 | \
|
$cmd "${args[@]}" 2>&1 | \
|
||||||
grep --color -E '\w+_specs?.cc:\d+|$'
|
grep --color -E '\w+_tests?.cc:\d+|$'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
debug)
|
debug)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
find src spec include -type f | xargs perl -pi -e 's/ +$//'
|
find src test include -type f | xargs perl -pi -e 's/ +$//'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "helpers/rule_helpers.h"
|
#include "helpers/rule_helpers.h"
|
||||||
#include "helpers/stream_methods.h"
|
#include "helpers/stream_methods.h"
|
||||||
#include "compiler/rules/built_in_symbols.h"
|
#include "compiler/rules/built_in_symbols.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/build_tables/lex_item.h"
|
#include "compiler/build_tables/lex_item.h"
|
||||||
#include "compiler/rules/metadata.h"
|
#include "compiler/rules/metadata.h"
|
||||||
#include "compiler/rules.h"
|
#include "compiler/rules.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/syntax_grammar.h"
|
#include "compiler/syntax_grammar.h"
|
||||||
#include "compiler/lexical_grammar.h"
|
#include "compiler/lexical_grammar.h"
|
||||||
#include "compiler/build_tables/parse_item_set_builder.h"
|
#include "compiler/build_tables/parse_item_set_builder.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/build_tables/rule_can_be_blank.h"
|
#include "compiler/build_tables/rule_can_be_blank.h"
|
||||||
#include "compiler/rules/metadata.h"
|
#include "compiler/rules/metadata.h"
|
||||||
#include "compiler/rules.h"
|
#include "compiler/rules.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/prepare_grammar/initial_syntax_grammar.h"
|
#include "compiler/prepare_grammar/initial_syntax_grammar.h"
|
||||||
#include "compiler/prepare_grammar/expand_repeats.h"
|
#include "compiler/prepare_grammar/expand_repeats.h"
|
||||||
#include "helpers/rule_helpers.h"
|
#include "helpers/rule_helpers.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/lexical_grammar.h"
|
#include "compiler/lexical_grammar.h"
|
||||||
#include "compiler/prepare_grammar/expand_tokens.h"
|
#include "compiler/prepare_grammar/expand_tokens.h"
|
||||||
#include "helpers/rule_helpers.h"
|
#include "helpers/rule_helpers.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/prepare_grammar/extract_choices.h"
|
#include "compiler/prepare_grammar/extract_choices.h"
|
||||||
#include "helpers/rule_helpers.h"
|
#include "helpers/rule_helpers.h"
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/lexical_grammar.h"
|
#include "compiler/lexical_grammar.h"
|
||||||
#include "compiler/prepare_grammar/interned_grammar.h"
|
#include "compiler/prepare_grammar/interned_grammar.h"
|
||||||
#include "compiler/prepare_grammar/initial_syntax_grammar.h"
|
#include "compiler/prepare_grammar/initial_syntax_grammar.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/prepare_grammar/flatten_grammar.h"
|
#include "compiler/prepare_grammar/flatten_grammar.h"
|
||||||
#include "compiler/prepare_grammar/initial_syntax_grammar.h"
|
#include "compiler/prepare_grammar/initial_syntax_grammar.h"
|
||||||
#include "compiler/syntax_grammar.h"
|
#include "compiler/syntax_grammar.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/prepare_grammar/intern_symbols.h"
|
#include "compiler/prepare_grammar/intern_symbols.h"
|
||||||
#include "compiler/grammar.h"
|
#include "compiler/grammar.h"
|
||||||
#include "compiler/rules/named_symbol.h"
|
#include "compiler/rules/named_symbol.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/prepare_grammar/parse_regex.h"
|
#include "compiler/prepare_grammar/parse_regex.h"
|
||||||
#include "helpers/equals_pointer.h"
|
#include "helpers/equals_pointer.h"
|
||||||
#include "helpers/rule_helpers.h"
|
#include "helpers/rule_helpers.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/rules/character_set.h"
|
#include "compiler/rules/character_set.h"
|
||||||
|
|
||||||
using namespace rules;
|
using namespace rules;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/rules/choice.h"
|
#include "compiler/rules/choice.h"
|
||||||
#include "helpers/rule_helpers.h"
|
#include "helpers/rule_helpers.h"
|
||||||
#include "helpers/equals_pointer.h"
|
#include "helpers/equals_pointer.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/rules/repeat.h"
|
#include "compiler/rules/repeat.h"
|
||||||
#include "compiler/rules/symbol.h"
|
#include "compiler/rules/symbol.h"
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "compiler/util/string_helpers.h"
|
#include "compiler/util/string_helpers.h"
|
||||||
|
|
||||||
using util::escape_char;
|
using util::escape_char;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "helpers/load_language.h"
|
#include "helpers/load_language.h"
|
||||||
#include "helpers/file_helpers.h"
|
#include "helpers/file_helpers.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -144,7 +144,7 @@ const TSLanguage *load_real_language(const string &language_name) {
|
||||||
if (loaded_languages[language_name])
|
if (loaded_languages[language_name])
|
||||||
return loaded_languages[language_name];
|
return loaded_languages[language_name];
|
||||||
|
|
||||||
string language_dir = string("spec/fixtures/grammars/") + language_name;
|
string language_dir = string("test/fixtures/grammars/") + language_name;
|
||||||
string grammar_filename = language_dir + "/src/grammar.json";
|
string grammar_filename = language_dir + "/src/grammar.json";
|
||||||
string parser_filename = language_dir + "/src/parser.c";
|
string parser_filename = language_dir + "/src/parser.c";
|
||||||
string external_scanner_filename = language_dir + "/src/scanner.cc";
|
string external_scanner_filename = language_dir + "/src/scanner.cc";
|
||||||
|
|
@ -12,7 +12,7 @@ using std::smatch;
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
|
|
||||||
string fixtures_dir = "spec/fixtures/";
|
string fixtures_dir = "test/fixtures/";
|
||||||
|
|
||||||
static string trim_output(const string &input) {
|
static string trim_output(const string &input) {
|
||||||
string result(input);
|
string result(input);
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "helpers/stream_methods.h"
|
#include "helpers/stream_methods.h"
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "tree_sitter/compiler.h"
|
#include "tree_sitter/compiler.h"
|
||||||
#include "compiler/parse_table.h"
|
#include "compiler/parse_table.h"
|
||||||
#include "compiler/syntax_grammar.h"
|
#include "compiler/syntax_grammar.h"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "spec_helper.h"
|
#include "test_helper.h"
|
||||||
#include "runtime/alloc.h"
|
#include "runtime/alloc.h"
|
||||||
#include "helpers/load_language.h"
|
#include "helpers/load_language.h"
|
||||||
#include "helpers/read_test_entries.h"
|
#include "helpers/read_test_entries.h"
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue