| Server IP : 185.208.173.17 / Your IP : 87.236.161.98 Web Server : Microsoft-IIS/10.0 System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64 User : IUSR ( 0) PHP Version : 7.4.13 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /inetpub/wwwroot/parsmega.nuxt/node_modules/npm/node_modules/libnpmdiff/test/ |
Upload File : |
const t = require('tap')
const shouldPrintPatch = require('../lib/should-print-patch.js')
t.test('valid filenames', t => {
t.ok(shouldPrintPatch('LICENSE'))
t.ok(shouldPrintPatch('.gitignore'))
t.ok(shouldPrintPatch('foo.md'))
t.ok(shouldPrintPatch('./bar.txt'))
t.ok(shouldPrintPatch('/a/b/c/bar.html'))
t.end()
})
t.test('invalid filenames', t => {
t.notOk(shouldPrintPatch('foo.exe'))
t.notOk(shouldPrintPatch('./foo.jpg'))
t.notOk(shouldPrintPatch('/a/b/c/bar.bin'))
t.end()
})
t.test('using --text/-a option', t => {
const opts = {
diffText: true,
}
t.ok(shouldPrintPatch('foo.exe', opts))
t.ok(shouldPrintPatch('./foo.jpg', opts))
t.ok(shouldPrintPatch('/a/b/c/bar.bin', opts))
t.end()
})