Skip to content

Commit db6fa15

Browse files
committed
test: add additional edge cases
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 617f7bd commit db6fa15

File tree

1 file changed

+27
-0
lines changed
  • lib/node_modules/@stdlib/string/base/format-tokenize/test

1 file changed

+27
-0
lines changed

lib/node_modules/@stdlib/string/base/format-tokenize/test/test.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,16 @@ tape( 'the function tokenizes a string (extracting escaped percent sign)', funct
286286
actual = formatTokenize( str );
287287
t.deepEqual( actual, expected, 'deep equal' );
288288

289+
str = 'Testing %%%% complete';
290+
expected = [
291+
'Testing ',
292+
'%',
293+
'%',
294+
' complete'
295+
];
296+
actual = formatTokenize( str );
297+
t.deepEqual( actual, expected, 'deep equal' );
298+
289299
str = 'Rate: %d%% success';
290300
expected = [
291301
'Rate: ',
@@ -302,5 +312,22 @@ tape( 'the function tokenizes a string (extracting escaped percent sign)', funct
302312
actual = formatTokenize( str );
303313
t.deepEqual( actual, expected, 'deep equal' );
304314

315+
str = 'Testing %%%d%% complete';
316+
expected = [
317+
'Testing ',
318+
'%',
319+
{
320+
'flags': '',
321+
'mapping': void 0,
322+
'width': void 0,
323+
'precision': void 0,
324+
'specifier': 'd'
325+
},
326+
'%',
327+
' complete'
328+
];
329+
actual = formatTokenize( str );
330+
t.deepEqual( actual, expected, 'deep equal' );
331+
305332
t.end();
306333
});

0 commit comments

Comments
 (0)