Fix tests in node 0.12

This commit is contained in:
Rodrigo Fernandes 2016-05-06 23:11:00 +01:00
parent cb145eddf6
commit 3cba36f959
No known key found for this signature in database
GPG key ID: 08E3C5F38969078E

View file

@ -198,7 +198,7 @@
* --- 2002-02-21 23:30:39.942229878 -0800 * --- 2002-02-21 23:30:39.942229878 -0800
*/ */
if (currentFile && !currentFile.oldName && if (currentFile && !currentFile.oldName &&
line.startsWith('---') && (values = getSrcFilename(line, config))) { utils.startsWith(line, '---') && (values = getSrcFilename(line, config))) {
currentFile.oldName = values; currentFile.oldName = values;
currentFile.language = getExtension(currentFile.oldName, currentFile.language); currentFile.language = getExtension(currentFile.oldName, currentFile.language);
return; return;
@ -209,7 +209,7 @@
* +++ 2002-02-21 23:30:39.942229878 -0800 * +++ 2002-02-21 23:30:39.942229878 -0800
*/ */
if (currentFile && !currentFile.newName && if (currentFile && !currentFile.newName &&
line.startsWith('+++') && (values = getDstFilename(line, config))) { utils.startsWith(line, '+++') && (values = getDstFilename(line, config))) {
currentFile.newName = values; currentFile.newName = values;
currentFile.language = getExtension(currentFile.newName, currentFile.language); currentFile.language = getExtension(currentFile.newName, currentFile.language);
return; return;
@ -226,7 +226,7 @@
* 2. Old line starts with: - * 2. Old line starts with: -
* 3. Context line starts with: <SPACE> * 3. Context line starts with: <SPACE>
*/ */
if (currentBlock && (line.startsWith('+') || line.startsWith('-') || line.startsWith(' '))) { if (currentBlock && (utils.startsWith(line, '+') || utils.startsWith(line, '-') || utils.startsWith(line, ' '))) {
createLine(line); createLine(line);
return; return;
} }