Skip to content
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

Improve tokei's language test coverage. #63

Open
XAMPPRocky opened this issue Sep 11, 2016 · 5 comments
Open

Improve tokei's language test coverage. #63

XAMPPRocky opened this issue Sep 11, 2016 · 5 comments

Comments

@XAMPPRocky
Copy link
Owner

XAMPPRocky commented Sep 11, 2016

There should be a file for each language that covers every edge case. The file should contain every variant comments and quotes, as well as a comment at the top of the file containing the manually verified lines, code, comments, blanks e.g. // 39 lines 32 code 2 comments 5 blanks. A good example of a test file is tests/data/rust.rs.

// 39 lines 32 code 2 comments 5 blanks

/* /**/ */
fn main() {
    let start = "/*";
    loop {
        if x.len() >= 2 && x[0] == '*' && x[1] == '/' { // found the */
            break;
        }
    }
}

fn foo() {
    let this_ends = "a \"test/*.";
    call1();
    call2();
    let this_does_not = /* a /* nested */ comment " */
        "*/another /*test
            call3();
            */";
}

fn foobar() {
    let does_not_start = // "
        "until here,
        test/*
        test"; // a quote: "
    let also_doesnt_start = /* " */
        "until here,
        test,*/
        test"; // another quote: "
}

fn foo() {
    let a = 4; // /*
    let b = 5;
    let c = 6; // */
}

Languages

  • ActionScript
  • Ada
  • Agda
  • Alex
  • ASP
  • ASP.NET
  • Assembly
  • AutoHotKey
  • Autoconf
  • BASH
  • Batch
  • C
  • C Header
  • CMake
  • C#
  • C Shell
  • Cabal
  • Cassius
  • Ceylon
  • Clojure
  • ClojureScript
  • CoffeeScript
  • Cogent
  • ColdFusion
  • ColdFusion CFScript
  • Coq
  • C++
  • C++ Header
  • Crystal
  • CSS
  • D
  • Dart
  • Device Tree
  • Dockerfile
  • Emacs Lisp
  • Elixir
  • Elm
  • Emacs Dev Env
  • Erlang
  • F#
  • Fish
  • Forth
  • FORTRAN Legacy
  • FORTRAN Modern
  • F*
  • GDScript
  • GLSL
  • Go
  • Hamlet
  • Handlebars
  • Happy
  • Haskell
  • HEX
  • HTML
  • Idris
  • Intel HEX
  • Isabelle
  • JAI
  • Java
  • JavaScript
  • JSON
  • JSX
  • Julia
  • Julius
  • Kotlin
  • Lean
  • LESS
  • LD Script
  • LISP
  • Lua
  • Lucius
  • Madlang
  • Makefile
  • Markdown
  • Module-Definition
  • MSBuild
  • Mustache
  • Nim
  • Nix
  • OCaml
  • Objective C
  • Objective C++
  • Org
  • Oz
  • PSL Assertion
  • Pascal
  • Perl
  • PHP
  • Polly
  • Processing
  • Prolog
  • Protocol Buffers
  • PureScript
  • Python
  • QCL
  • QML
  • R
  • Rakefile
  • Razor
  • ReStructuredText
  • Ruby
  • Ruby HTML
  • Rust
  • SRecode Template
  • Sass
  • Scala
  • Scons
  • Shell
  • Standard ML (SML)
  • Specman e
  • Spice Netlist
  • SQL
  • SVG
  • Swift
  • SystemVerilog
  • TCL
  • TeX
  • Plain Text
  • TOML
  • TypeScript
  • Unreal Script
  • Ur/Web
  • Ur/Web Project
  • Vala
  • Verilog
  • Verilog Args File
  • VHDL
  • Vim Script
  • Visual Basic
  • Wolfram
  • XAML
  • XML
  • Xtend
  • YAML
  • Zsh
@XAMPPRocky XAMPPRocky changed the title More comprehensive test suite. Improve tokei's test language test coverage. Apr 7, 2018
@XAMPPRocky XAMPPRocky changed the title Improve tokei's test language test coverage. Improve tokei's language test coverage. Apr 7, 2018
@Emulebest
Copy link

I could start working on some languages on the weekends if it is okay for the terms

@XAMPPRocky
Copy link
Owner Author

@Emulebest Contribute when you can. All contributions are welcome.

@JHaig343
Copy link
Contributor

I'd also like to help with some language tests as part of Hacktoberfest this year.

@XAMPPRocky
Copy link
Owner Author

@JHaig343 Sure!

@JHaig343
Copy link
Contributor

JHaig343 commented Oct 3, 2019

@XAMPPRocky I noticed that proper execution of the test file requires the top comment to be in the file and in the correct format(X lines X code X comments X blanks). The contributing doc for Tests does not mention that the format is required. Would I be able to make a PR to explicitly state the required format in CONTRIBUTING.md?

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

No branches or pull requests

3 participants