mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Fixed import of tables and added tests
This commit is contained in:
parent
526ef7e1d2
commit
2e2b35dfeb
@ -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
|
||||
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)
|
@ -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('');
|
||||
|
||||
|
3
CliClient/tests/html_to_md/tableWithNewLines.html
Normal file
3
CliClient/tests/html_to_md/tableWithNewLines.html
Normal file
@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<table style="-evernote-table:true;border-collapse:collapse;width:100%;table-layout:fixed;margin-left:0px;"><tr><td style="border-style:solid;border-width:1px;border-color:rgb(211,211,211);padding:10px;margin:0px;width:50%;"><div>line 1</div><div>line 2</div></td><td style="border-style:solid;border-width:1px;border-color:rgb(211,211,211);padding:10px;margin:0px;width:50%;"><div><br/></div></td></tr><tr><td style="border-style:solid;border-width:1px;border-color:rgb(211,211,211);padding:10px;margin:0px;width:50%;"><div>aaaaaa</div></td><td style="border-style:solid;border-width:1px;border-color:rgb(211,211,211);padding:10px;margin:0px;width:50%;"><div>line 3</div><div>line 4</div></td></tr></table>
|
||||
</div>
|
4
CliClient/tests/html_to_md/tableWithNewLines.md
Normal file
4
CliClient/tests/html_to_md/tableWithNewLines.md
Normal file
@ -0,0 +1,4 @@
|
||||
| | |
|
||||
| --- | --- |
|
||||
| line 1<br>line 2 | |
|
||||
| aaaaaa | line 3<br>line 4 |
|
Loading…
Reference in New Issue
Block a user