From 04fe2a19dc2b4d3df237345639a6c048d8b66e2c Mon Sep 17 00:00:00 2001 From: jdkato Date: Thu, 17 Mar 2022 13:33:02 -0700 Subject: [PATCH] Add test for CL --- testdata/ColemanLiau/.vale.ini | 6 ++++++ testdata/ColemanLiau/test.md | 15 +++++++++++++++ testdata/test.ct | 6 +++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 testdata/ColemanLiau/.vale.ini create mode 100644 testdata/ColemanLiau/test.md diff --git a/testdata/ColemanLiau/.vale.ini b/testdata/ColemanLiau/.vale.ini new file mode 100644 index 0000000..c722594 --- /dev/null +++ b/testdata/ColemanLiau/.vale.ini @@ -0,0 +1,6 @@ +StylesPath = ../../ + +MinAlertLevel = suggestion + +[*.md] +Readability.ColemanLiau = YES \ No newline at end of file diff --git a/testdata/ColemanLiau/test.md b/testdata/ColemanLiau/test.md new file mode 100644 index 0000000..a011525 --- /dev/null +++ b/testdata/ColemanLiau/test.md @@ -0,0 +1,15 @@ +# Example + +The Flesch Reading Ease gives a text a score between 1 and 100, with 100 being +the highest readability score. Scoring between 70 to 80 is equivalent to school +grade level 8. This means text should be fairly easy for the average adult to +read. + +The formula was developed in the 1940s by Rudolf Flesch. He was a consultant +with the Associated Press, developing methods for improving the readability of +newspapers. + +Now, over 70 years later, the Flesch Reading Ease is used by marketers, +research communicators and policy writers, amongst many others. All use it to +help them assess the ease by which a piece of text will be understood and +engaged with. \ No newline at end of file diff --git a/testdata/test.ct b/testdata/test.ct index 54c32f9..9f3a4e3 100644 --- a/testdata/test.ct +++ b/testdata/test.ct @@ -1,3 +1,7 @@ $ cdf ${ROOTDIR}/LIX $ vale --output=line --sort --normalize --relative test.md -test.md:1:1:Readability.LIX:Try to keep the LIX score (38.27) below 35. \ No newline at end of file +test.md:1:1:Readability.LIX:Try to keep the LIX score (38.27) below 35. + +$ cdf ${ROOTDIR}/ColemanLiau +$ vale --output=line --sort --normalize --relative test.md +test.md:1:1:Readability.ColemanLiau:Try to keep the Coleman–Liau Index grade (9.58) below 9. \ No newline at end of file