<commit_before>/* global suite, test */

var assert = require( 'assert' );
var vscode = require( 'vscode' );
var vscodeTestContent = require( 'vscode-test-content' );

suite( "Bold", function() {
    test( "Ranged selection", function() {
        return TestCommand( 'toggleBold', 'Lets make a [bold} text!', 'Lets make a [**bold**} text!' );
    } );

    test( "Collapsed selection", function() {
        // This is likely to be changed with #5.
        return TestCommand( 'toggleBold', 'Lets make a bo^ld text!', 'Lets make a bo**^**ld text!' );
    } );

    test( "Toggles with ranged selection", function() {
        return TestCommand( 'toggleBold', 'Time to [**unbold**} this statement', 'Time to [unbold} this statement' );
    } );
} );

suite( "Italic", function() {
    test( "Ranged selection", function() {
        return TestCommand( 'toggleItalic', 'Lets make a [fancy} text!', 'Lets make a [_fancy_} text!' );
    } );

    test( "Collapsed selection", function() {
        // This is likely to be changed with #5.
        return TestCommand( 'toggleItalic', 'Lets make a fan^cy text!', 'Lets make a fan_^_cy text!' );
    } );

    test( "Toggles with ranged selection", function() {
        return TestCommand( 'toggleItalic', 'Lets make less [_fancy_} text', 'Lets make less [fancy} text' );
    } );
} );

suite( "Strike through", function() {
    test( "Ranged selection", function() {
        return TestCommand( 'toggleStrikethrough', 'Lets make a [fancy} text!', 'Lets make a [~~fancy~~} text!' );
    } );

    test( "Collapsed selection", function() {
        // This is likely to be changed with #5.
        return TestCommand( 'toggleStrikethrough', 'Lets make a fan^cy text!', 'Lets make a fan~~^~~cy text!' );
    } );

    test( "Toggles with ranged selection", function() {
        return TestCommand( 'toggleStrikethrough', 'Lets make less [~~fancy~~} text', 'Lets make less [fancy} text' );
    } );
} );

suite( "Inline code", function() {
    test( "Ranged selection", function() {
        return TestCommand( 'toggleInlineCode', 'Lets make a [fancy} text!', 'Lets make a [`fancy`} text!' );
    } );

    test( "Collapsed selection", function() {
        // This is likely to be changed with #5.
        return TestCommand( 'toggleInlineCode', 'Lets make a fan^cy text!', 'Lets make a fan`^`cy text!' );
    } );

    test( "Toggles with ranged selection", function() {
        return TestCommand( 'toggleInlineCode', 'Lets make less [`fancy`} text', 'Lets make less [fancy} text' );
    } );
} );

suite( "Headers", function() {
    // For headers we'll generate the tests, so that this test suite doesn't get too bloat.
    for ( let i = 1; i <= 6; i++ ) {
        suite( 'Level ' + i, function() {
            var headerMarker = '#'.repeat( i );

            test( "Ranged selection", function() {
                return TestCommand( `toggleTitleH${i}`, 'Lets make a [fancy} text!', `Lets make a [${headerMarker} fancy} text!` );
            } );

            test( "Collapsed selection", function() {
                // This is likely to be changed with #5.
                return TestCommand( `toggleTitleH${i}`, 'Lets make a fan^cy text!', `Lets make a fan${headerMarker} ^cy text!` );
            } );

            test( "Toggles with ranged selection", function() {
                return TestCommand( `toggleTitleH${i}`, `Lets make less [${headerMarker} fancy} text`, 'Lets make less [fancy} text' );
            } );
        } );
    }
} );

suite( "Block code", function() {
    test( "Ranged selection", function() {
        return TestCommand( 'toggleCodeBlock', '[some code}', '[```\nsome code```}' );
    } );
<commit_msg>Tests updated to new requirements.<commit_after>/* global suite, test */

var assert = require( 'assert' );
var vscode = require( 'vscode' );
var vscodeTestContent = require( 'vscode-test-content' );

suite( "Bold", function() {
    test( "Ranged selection", function() {
        return TestCommand( 'toggleBold', 'Lets make a [bold} text!', 'Lets make a [**bold**} text!' );
    } );

    test( "Collapsed selection", function() {
        // This is likely to be changed with #5.
        return TestCommand( 'toggleBold', 'Lets make a bo^ld text!', 'Lets make a [**bold**} text!' );
    } );

    test( "Collapsed selection empty editor", function() {
        // make sure nothing wrong happens when the editor is totally empty.
        return TestCommand( 'toggleBold', '^', '**^**' );
    } );

    test( "Toggles with ranged selection", function() {
        return TestCommand( 'toggleBold', 'Time to [**unbold**} this statement', 'Time to [unbold} this statement' );
    } );
} );

suite( "Italic", function() {
    test( "Ranged selection", function() {
        return TestCommand( 'toggleItalic', 'Lets make a [fancy} text!', 'Lets make a [_fancy_} text!' );
    } );

    test( "Collapsed selection", function() {
        // This is likely to be changed with #5.
        return TestCommand( 'toggleItalic', 'Lets make a fan^cy text!', 'Lets make a [_fancy_} text!' );
    } );

    test( "Toggles with ranged selection", function() {
        return TestCommand( 'toggleItalic', 'Lets make less [_fancy_} text', 'Lets make less [fancy} text' );
    } );
} );

suite( "Strike through", function() {
    test( "Ranged selection", function() {
        return TestCommand( 'toggleStrikethrough', 'Lets make a [fancy} text!', 'Lets make a [~~fancy~~} text!' );
    } );

    test( "Collapsed selection", function() {
        // This is likely to be changed with #5.
        return TestCommand( 'toggleStrikethrough', 'Lets make a fan^cy text!', 'Lets make a [~~fancy~~} text!' );
    } );

    test( "Toggles with ranged selection", function() {
        return TestCommand( 'toggleStrikethrough', 'Lets make less [~~fancy~~} text', 'Lets make less [fancy} text' );
    } );
} );

suite( "Inline code", function() {
    test( "Ranged selection", function() {
        return TestCommand( 'toggleInlineCode', 'Lets make a [fancy} text!', 'Lets make a [`fancy`} text!' );
    } );

    test( "Collapsed selection", function() {
        // This is likely to be changed with #5.
        return TestCommand( 'toggleInlineCode', 'Lets make a fan^cy text!', 'Lets make a [`fancy`} text!' );
    } );

    test( "Toggles with ranged selection", function() {
        return TestCommand( 'toggleInlineCode', 'Lets make less [`fancy`} text', 'Lets make less [fancy} text' );
    } );
} );

suite( "Headers", function() {
    // For headers we'll generate the tests, so that this test suite doesn't get too bloat.
    for ( let i = 1; i <= 6; i++ ) {
        suite( 'Level ' + i, function() {
            var headerMarker = '#'.repeat( i );

            test( "Ranged selection", function() {
                return TestCommand( `toggleTitleH${i}`, 'Lets make a [fancy} text!', `Lets make a [${headerMarker} fancy} text!` );
            } );

            test( "Collapsed selection", function() {
                // This is likely to be changed with #5.
                return TestCommand( `toggleTitleH${i}`, 'Lets make a fan^cy text!', `Lets make a [${headerMarker} fancy} text!` );
            } );

            test( "Toggles with ranged selection", function() {
                return TestCommand( `toggleTitleH${i}`, `Lets make less [${headerMarker} fancy} text`, 'Lets make less [fancy} text' );
            } );
        } );
    }
} );

suite( "Block code", function() {
    test( "Ranged selection", function() {
        return TestCommand( 'toggleCodeBlock', '[some code}', '[```\nsome code```}' );
    } );

{'fraction_non_alphanumeric': 0.16460036929570035, 'fraction_numerical': 0.0018464785017145871, 'mean_word_length': 2.866904640489546, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1840872', 'n_tokens_mistral': 2377, 'n_tokens_neox': 2321, 'n_words': 796}