diff --git a/CliClient/run_test.sh b/CliClient/run_test.sh index 9f16291ce..f71fd548d 100755 --- a/CliClient/run_test.sh +++ b/CliClient/run_test.sh @@ -8,15 +8,16 @@ rsync -a "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/" rsync -a "$ROOT_DIR/build/locales/" "$BUILD_DIR/locales/" mkdir -p "$BUILD_DIR/data" -if [[ $TEST_FILE == "" ]]; then - (cd "$ROOT_DIR" && npm test tests-build/synchronizer.js) - (cd "$ROOT_DIR" && npm test tests-build/encryption.js - (cd "$ROOT_DIR" && npm test tests-build/ArrayUtils.js) - (cd "$ROOT_DIR" && npm test tests-build/models_Setting.js) - (cd "$ROOT_DIR" && npm test tests-build/models_Note.js) - (cd "$ROOT_DIR" && npm test tests-build/models_Folder.js) - (cd "$ROOT_DIR" && npm test tests-build/services_InteropService.js) - (cd "$ROOT_DIR" && npm test tests-build/HtmlToMd.js) -else +if [[ $TEST_FILE != "" ]]; then (cd "$ROOT_DIR" && npm test tests-build/$TEST_FILE.js) -fi \ No newline at end of file + exit +fi + +(cd "$ROOT_DIR" && npm test tests-build/synchronizer.js) +(cd "$ROOT_DIR" && npm test tests-build/encryption.js +(cd "$ROOT_DIR" && npm test tests-build/ArrayUtils.js) +(cd "$ROOT_DIR" && npm test tests-build/models_Setting.js) +(cd "$ROOT_DIR" && npm test tests-build/models_Note.js) +(cd "$ROOT_DIR" && npm test tests-build/models_Folder.js) +(cd "$ROOT_DIR" && npm test tests-build/services_InteropService.js) +(cd "$ROOT_DIR" && npm test tests-build/HtmlToMd.js) \ No newline at end of file diff --git a/CliClient/tests/HtmlToMd.js b/CliClient/tests/HtmlToMd.js index 21c7f2707..b8db791b8 100644 --- a/CliClient/tests/HtmlToMd.js +++ b/CliClient/tests/HtmlToMd.js @@ -35,7 +35,7 @@ describe('HtmlToMd', function() { const htmlPath = basePath + '/' + htmlFilename; const mdPath = basePath + '/' + filename(htmlFilename) + '.md'; - // if (htmlFilename !== 'inlineCodeWithLink.html') continue; + // if (htmlFilename !== 'tableWithNewLines.html') continue; const html = await shim.fsDriver().readFile(htmlPath); const expectedMd = await shim.fsDriver().readFile(mdPath); @@ -47,9 +47,9 @@ describe('HtmlToMd', function() { console.info(''); console.info('Error converting file: ' + htmlFilename); console.info('--------------------------------- Got:'); - console.info(actualMd); + console.info(actualMd.split('\n')); console.info('--------------------------------- Expected:'); - console.info(expectedMd); + console.info(expectedMd.split('\n')); console.info('--------------------------------------------'); console.info(''); diff --git a/CliClient/tests/html_to_md/tableWithNewLines.html b/CliClient/tests/html_to_md/tableWithNewLines.html new file mode 100644 index 000000000..54a7e135f --- /dev/null +++ b/CliClient/tests/html_to_md/tableWithNewLines.html @@ -0,0 +1,3 @@ +
+
line 1
line 2

aaaaaa
line 3
line 4
+
\ No newline at end of file diff --git a/CliClient/tests/html_to_md/tableWithNewLines.md b/CliClient/tests/html_to_md/tableWithNewLines.md new file mode 100644 index 000000000..7547af7a9 --- /dev/null +++ b/CliClient/tests/html_to_md/tableWithNewLines.md @@ -0,0 +1,4 @@ +| | | +| --- | --- | +| line 1
line 2 | | +| aaaaaa | line 3
line 4 | \ No newline at end of file