alcotest icon indicating copy to clipboard operation
alcotest copied to clipboard

Make it configurable on the ending `.` after the name of the test case

Open arbipher opened this issue 3 years ago • 2 comments

Is it possible to not append the . at the end of the line?

e.g. as the demo shows

$ ./simple.native test '.*concat*'
Testing Utils.
[SKIP]     string-case            0   Lower case.
[SKIP]     string-case            1   Capitalization.
[OK]       string-concat          0   String mashing.
[OK]       list-concat            0   List mashing.
The full test results are available in `_build/_tests`.
Test Successful in 0.000s. 2 tests run.

can it be Lower case instead of Lower case. by configuration?

The reason (of this weird-looking issue) is if we use the file path as the name of the test case, we will get path/to/testfile. instead of path/to/testfile

My editor (vscode) would support and locate path/to/testfile better than path/to/testfile..

I guess it may also be easier to operate even for copying the path from the output.

arbipher avatar Nov 08 '21 21:11 arbipher

I'd rather not make this configurable, but personally I'm happy to drop the . unconditionally (by removing these lines of code). Would that work? I'd guess this . was originally added because the "documentation" strings for test cases were intended to be full sentences, but I don't often see them used that way in the wild (and these users can presumably affix the . themselves).

CC @samoht.

craigfe avatar Nov 08 '21 22:11 craigfe

Dropping . sounds good to me.

arbipher avatar Nov 08 '21 22:11 arbipher