<commit_before>import test from 'ava';
import fn from './';

test(t => {
	t.same(fn('unicorn v1.2.3 rainbow'), ['1.2.3']);
	t.same(fn('version 3.2.51(1)-release'), ['3.2.51']);
	t.same(fn('cp (GNU coreutils) 8.22'), []);
	t.same(fn('foo v2.0.0 rainbow 1.88'), ['2.0.0']);
	t.same(fn('foo v2.0.0 rainbow 1.88', {loose: true}), ['2.0.0', '1.88.0']);
	t.same(fn('cp (GNU coreutils) 8.22', {loose: true}), ['8.22.0']);
	t.same(fn('v1.0.0 foo 9.33 cp (GNU coreutils) 8.22 sad', {loose: true}), ['1.0.0', '9.33.0', '8.22.0']);
	t.same(fn('0.13.alpha.4', {loose: true}), ['0.13.0']);
	t.same(fn('PHP 5.6.0beta1 (cli) (built: Aug 30 2014 13:52:33)\n Copyright (c) 1997-2014 The PHP Group\nZend Engine v2.6.0-dev, Copyright (c) 1998-2014 Zend Technologies\n    with Xdebug v2.2.4, Copyright (c) 2002-2014, by <NAME>', {loose: true}), ['5.6.0', '2.6.0-dev', '2.2.4']);
	t.same(fn('Compass 0.12.7', {loose: true}), ['0.12.7']);
	t.same(fn('1.14.2beta', {loose: true}), ['1.14.2']);
	t.same(fn('PHP 7.0.0RC6 (cli) (built: Oct 29 2015 13:46:05) ( NTS )\nCopyright (c) 1997-2015 The PHP Group\nZend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies', {loose: true}), ['7.0.0', '3.0.0-dev']);
});<commit_msg>upgrade to latest AVA<commit_after>import test from 'ava';
import fn from './';

test(t => {
	t.deepEqual(fn('unicorn v1.2.3 rainbow'), ['1.2.3']);
	t.deepEqual(fn('version 3.2.51(1)-release'), ['3.2.51']);
	t.deepEqual(fn('cp (GNU coreutils) 8.22'), []);
	t.deepEqual(fn('foo v2.0.0 rainbow 1.88'), ['2.0.0']);
	t.deepEqual(fn('foo v2.0.0 rainbow 1.88', {loose: true}), ['2.0.0', '1.88.0']);
	t.deepEqual(fn('cp (GNU coreutils) 8.22', {loose: true}), ['8.22.0']);
	t.deepEqual(
		fn('v1.0.0 foo 9.33 cp (GNU coreutils) 8.22 sad', {loose: true}),
		['1.0.0', '9.33.0', '8.22.0']
	);
	t.deepEqual(fn('0.13.alpha.4', {loose: true}), ['0.13.0']);
	t.deepEqual(
		fn('PHP 5.6.0beta1 (cli) (built: Aug 30 2014 13:52:33)\n Copyright (c) 1997-2014 The PHP Group\nZend Engine v2.6.0-dev, Copyright (c) 1998-2014 Zend Technologies\n    with Xdebug v2.2.4, Copyright (c) 2002-2014, by <NAME>', {loose: true}),
		['5.6.0', '2.6.0-dev', '2.2.4']
	);
	t.deepEqual(fn('Compass 0.12.7', {loose: true}), ['0.12.7']);
	t.deepEqual(fn('1.14.2beta', {loose: true}), ['1.14.2']);
	t.deepEqual(
		fn('PHP 7.0.0RC6 (cli) (built: Oct 29 2015 13:46:05) ( NTS )\nCopyright (c) 1997-2015 The PHP Group\nZend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies', {loose: true}),
		['7.0.0', '3.0.0-dev']
	);
});
{'fraction_non_alphanumeric': 0.27553063676411693, 'fraction_numerical': 0.14977973568281938, 'mean_word_length': 3.907662082514735, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1573894', 'n_tokens_mistral': 1335, 'n_tokens_neox': 1141, 'n_words': 256}