/*global test,regex,strictEqual,module,ok*/

module('any()');

test('any() and none() do not confuse - chars', function () {
    'use strict';

    var actual, expected;

    actual = regex().any('a-d').peek();
    expected = '[a\\-d]';

    strictEqual(actual, expected, '- char should be escaped for any()');

    actual = regex().none('a-d').peek();
    expected = '[^a\\-d]';

    strictEqual(actual, expected, '- char should be escaped for any()');
});

test('any() from dash to slash escapes them', function () {
    'use strict';

    regex()
        .anyFrom('-', '/')
        .call(function (rb) {
            strictEqual(rb.peek(), '[\\--/]');
            ok(rb.test('.'), 'ascii for period is between dash and /, so should test for it correctly');
        });
});

@@ -764,12 +764,409 @@
     %7D);%0A%7D);%0A
+%0Atest('capturing two anys from a sequence would need non-capture', function () %7B%0A    'use strict';%0A    regex()%0A        .seq()%0A            .anyOf('ab')%0A            .anyOf('cd')%0A        .end()%0A        .call(function (rb) %7B%0A            strictEqual(rb.peek(), '%5Bab%5D%5Bcd%5D');%0A        %7D)%0A        .repeat()%0A        .call(function (rb) %7B%0A            strictEqual(rb.peek(), '(?:%5Bab%5D%5Bcd%5D)*');%0A        %7D);%0A%7D);%0A

make sure to wrap multiterm anys in a non-capture