mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #6447 from Snuffleupagus/issue-6416-unit-test
Add unit-tests for `removeNullCharacters` (PR 6431 follow-up)
This commit is contained in:
commit
abf9a76a66
1 changed files with 12 additions and 1 deletions
|
@ -1,10 +1,21 @@
|
|||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||
/* globals expect, it, describe, binarySearchFirstItem */
|
||||
/* globals expect, it, describe, binarySearchFirstItem, removeNullCharacters */
|
||||
|
||||
'use strict';
|
||||
|
||||
describe('ui_utils', function() {
|
||||
describe('removeNullCharacters', function() {
|
||||
it('should not modify string without null characters', function() {
|
||||
var str = 'string without null chars';
|
||||
expect(removeNullCharacters(str)).toEqual('string without null chars');
|
||||
});
|
||||
|
||||
it('should modify string with null characters', function() {
|
||||
var str = 'string\x00With\x00Null\x00Chars';
|
||||
expect(removeNullCharacters(str)).toEqual('stringWithNullChars');
|
||||
});
|
||||
});
|
||||
|
||||
describe('binary search', function() {
|
||||
function isTrue(boolean) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue