<commit_before>/*!
 * to-clipboard <https://github.com/jonschlinkert/to-clipboard>
 *
 * Copyright (c) 2015 .
 * Licensed under the MIT license.
 */

'use strict';

/* deps:mocha */
var assert = require('assert');
var should = require('should');
var os = require('os');
var toClipboard = require('./');
var program = ({win: 'clip', linux: 'xclip', darwin: 'pbcopy'})[os.platform()];

describe('toClipboard', function () {
  it('should format args:', function () {
    assert.strictEqual(toClipboard.format('foo'), 'printf foo | ' + program);
    assert.strictEqual(toClipboard.format('<div></div>'), 'printf \'<div></div>\' | ' + program);
    assert.strictEqual(toClipboard.format('bar baz'), 'printf \'bar baz\' | ' + program);
    assert.strictEqual(toClipboard.format(['bar', 'baz']), 'printf bar baz | ' + program);
    assert.strictEqual(toClipboard.format('bar | baz'), 'printf \'bar | baz\' | ' + program);
    assert.strictEqual(toClipboard.format(['bar', '|', 'baz']), 'printf bar \'|\' baz | ' + program);
  });
});
<commit_msg>use echo<commit_after>/*!
 * to-clipboard <https://github.com/jonschlinkert/to-clipboard>
 *
 * Copyright (c) 2015 .
 * Licensed under the MIT license.
 */

'use strict';

/* deps:mocha */
var assert = require('assert');
var should = require('should');
var toClipboard = require('./');
var program = ({win: 'clip', linux: 'xclip', darwin: 'pbcopy'})[process.platform];

describe('toClipboard', function () {
  it('should format args:', function () {
    assert.strictEqual(toClipboard.format('foo'), 'echo foo | ' + program);
    assert.strictEqual(toClipboard.format('<div></div>'), 'echo \'<div></div>\' | ' + program);
    assert.strictEqual(toClipboard.format('bar baz'), 'echo \'bar baz\' | ' + program);
    assert.strictEqual(toClipboard.format(['bar', 'baz']), 'echo bar baz | ' + program);
    assert.strictEqual(toClipboard.format('bar | baz'), 'echo \'bar | baz\' | ' + program);
    assert.strictEqual(toClipboard.format(['bar', '|', 'baz']), 'echo bar \'|\' baz | ' + program);
  });
});

{'fraction_non_alphanumeric': 0.22156862745098038, 'fraction_numerical': 0.00392156862745098, 'mean_word_length': 4.486559139784946, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '3641314', 'n_tokens_mistral': 697, 'n_tokens_neox': 670, 'n_words': 142}