<commit_before>#!/bin/bash

. util.sh

function test_json()
{
	NAME="${TMPDIR}/jsontest$N.json"
	lwp-request -m GET http://localhost:6085/$1 > $NAME
	if [ "x$?" = "x0" ]; then pass; else fail "json failed: $1 failed"; fi
	inc
	FOO=$(jsonlint $NAME)
	if [ "x$?" = "x0" ]; then pass; else fail "json failed: $1 failed: $FOO"; fi
	inc

}

test_json vcljson/
test_json paramjson/
test_json stats
test_json log/100/RxURL

# XXX: This will produce a CLI command for vcl.list, and a log entry
# thereafter.
# This is known to break, but should still be a test case.
test_it_long GET vcl/ "" "active"
KNOWN_FAIL=1
test_json log/100/CLI
KNOWN_FAIL=0
exit $ret<commit_msg>Run jsonlint in verbose mode<commit_after>#!/bin/bash

. util.sh

function test_json()
{
	NAME="${TMPDIR}/jsontest$N.json"
	lwp-request -m GET http://localhost:6085/$1 > $NAME
	if [ "x$?" = "x0" ]; then pass; else fail "json failed: $1 failed"; fi
	inc
	FOO=$(jsonlint -v $NAME)
	if [ "x$?" = "x0" ]; then pass; else fail "json failed: $1 failed: $FOO"; fi
	inc

}

test_json vcljson/
test_json paramjson/
test_json stats
test_json log/100/RxURL

# XXX: This will produce a CLI command for vcl.list, and a log entry
# thereafter.
# This is known to break, but should still be a test case.
test_it_long GET vcl/ "" "active"
KNOWN_FAIL=1
test_json log/100/CLI
KNOWN_FAIL=0
exit $ret
{'fraction_non_alphanumeric': 0.14083457526080476, 'fraction_numerical': 0.02533532041728763, 'mean_word_length': 4.067924528301887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2702826', 'n_tokens_mistral': 541, 'n_tokens_neox': 517, 'n_words': 170}