New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ClojureC + tests for all Clojure #224

Merged
merged 2 commits into from Apr 26, 2018

Conversation

2 participants
@DjebbZ
Contributor

DjebbZ commented Apr 26, 2018

Hello,

I'm trying to contribute support for cljc files (which is a normal Clojure that can compile both to clj and cljs). I've build the project locally with cargo build, then ran it with cargo run /path/to/a/clojure/project and it does report ClojureC stats.

However I have trouble adding tests. When I run cargo test all tests pass but I don't see any Clojure stuff in the output. Here's the output :

> cargo test
    Finished dev [unoptimized + debuginfo] target(s) in 0.18 secs
     Running target/debug/deps/tokei-29cdc45eb9eb5ec5

running 1 test
test utils::fs::test::walker_directory_as_file ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/tokei-026584b8fa7f366d

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/accuracy-7233a4987b057df0

running 36 tests
test cogent ... ok
test dockerfile ... ok
test d ... ok
test cpp ... ok
test elvish ... ok
test emacs_dev_env ... ok
test cmake ... ok
test crystal ... ok
test emacs_lisp ... ok
test hpp ... ok
test fsharp ... ok
test fstar ... ok
test makefile ... ok
test java ... ok
test html ... ok
test kakoune_script ... ok
test meson ... ok
test moduledef ... ok
test qml ... ok
test msbuild ... ok
test org_mode ... ok
test rakefile ... ok
test ruby ... ok
test rust ... ok
test srecode ... ok
test sconstruct ... ok
test racket ... ok
test urweb_urp ... ok
test urweb_urs ... ok
test visualbasic ... ok
test urweb ... ok
test vhdl ... ok
test xtend ... ok
test zig ... ok
test xsl ... ok
test scheme ... ok

test result: ok. 36 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests tokei

running 23 tests
test src/language/language.rs - language::language::Language::is_blank (line 238) ... ok
test src/language/language.rs - language::language::Language::nested (line 250) ... ok
test src/language/language.rs - language::language::Language::new (line 48) ... ok
test src/language/language.rs - language::language::Language::is_empty (line 223) ... ok
test src/language/language.rs - language::language::Language::new_blank (line 67) ... ok
test src/language/language.rs - language::language::Language::nested_comments (line 264) ... ok
test src/language/language.rs - language::language::Language::new_func (line 100) ... ok
test src/language/language.rs - language::language::Language::new_c (line 80) ... ok
test src/language/language.rs - language::language::Language::new_multi (line 173) ... ok
test src/language/language.rs - language::language::Language::new_haskell (line 153) ... ok
test src/language/language.rs - language::language::Language::new_hash (line 138) ... ok
test src/language/languages.rs - language::languages::Languages::get_statistics (line 231) ... ok
test src/language/language.rs - language::language::Language::new_html (line 119) ... ok
test src/language/language.rs - language::language::Language::new_single (line 208) ... ok
test src/language/language.rs - language::language::Language::set_quotes (line 284) ... ok
test src/language/language.rs - language::language::Language::new_pro (line 188) ... ok
test src/lib.rs -  (line 21) ... ok
test src/language/language.rs - language::language::Language::sort_by (line 302) ... ok
test target/debug/build/tokei-ea0114fd00094eff/out/language_type.rs - language::language_type::LanguageType::from_path (line 853) ... ok
test src/language/languages.rs - language::languages::Languages::new (line 243) ... ok
test src/stats.rs - stats::Stats::new (line 24) ... ok
test target/debug/build/tokei-ea0114fd00094eff/out/language_type.rs - language::language_type::LanguageType::name (line 174) ... ok
test src/language/languages.rs - language::languages::Languages::remove_empty (line 253) ... ok

test result: ok. 23 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Note: total Rust beginner here, I've just finished reading the Rust book but nothing more. I don't understand everything in your test generating "macro" stuff in ./build.rs.

I hope you can help me contribute this. Thanks in advance!

@DjebbZ

This comment has been minimized.

Contributor

DjebbZ commented Apr 26, 2018

Forget my previous comment, my second commit should fix the problem.

@Aaronepower

This comment has been minimized.

Owner

Aaronepower commented Apr 26, 2018

Thank you for your PR and congratulations on your first contribution!

@Aaronepower Aaronepower merged commit 349fe2b into Aaronepower:master Apr 26, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@DjebbZ

This comment has been minimized.

Contributor

DjebbZ commented Apr 26, 2018

@DjebbZ DjebbZ deleted the DjebbZ:add-cljc-lang-and-clojure-tests branch Apr 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment