Only populate XPOS column
Change-Id: I0606660bcf260a92d414179a6a87978a85ad8797
diff --git a/test/test.js b/test/test.js
index 8c2ce1d..ee1d498 100644
--- a/test/test.js
+++ b/test/test.js
@@ -6,15 +6,15 @@
// Modify the command based on your script's location and options
const command = 'node src/index.js -s < test/data/ndy.conllu';
const stdout = execSync(command).toString();
- expect(stdout).toContain('😂\t_\tEMOIMG\tEMOIMG');
+ expect(stdout).toContain('😂\t_\t_\tEMOIMG');
var emoimg_count = (stdout.match(/EMOIMG/g) || []).length;
- expect(emoimg_count).toBe(382);
+ expect(emoimg_count).toBe(191);
var ascimg_count = (stdout.match(/EMOASC/g) || []).length;
- expect(ascimg_count).toBe(60);
- var ascimg_count = (stdout.match(/URL/g) || []).length;
- expect(ascimg_count).toBe(8);
- var adr_count = (stdout.match(/ADR/g) || []).length;
- expect(adr_count).toBe(2);
+ expect(ascimg_count).toBe(30);
+ var url_count = (stdout.match(/\tURL\t/g) || []).length;
+ expect(url_count).toBe(4);
+ var adr_count = (stdout.match(/\tADR\t/g) || []).length;
+ expect(adr_count).toBe(1);
var eot_count = (stdout.match(/\n# eot/g) || []).length;
expect(eot_count).toBe(1);
var eof_count = (stdout.match(/\n# eof/g) || []).length;
@@ -27,15 +27,15 @@
test('Test full mode', (done) => {
const command = 'node src/index.js < test/data/ndy.conllu';
const stdout = execSync(command).toString();
- expect(stdout).toContain('😂\t_\tEMOIMG\tEMOIMG');
+ expect(stdout).toContain('😂\t_\t_\tEMOIMG');
var emoimg_count = (stdout.match(/EMOIMG/g) || []).length;
- expect(emoimg_count).toBe(382);
+ expect(emoimg_count).toBe(191);
var ascimg_count = (stdout.match(/EMOASC/g) || []).length;
- expect(ascimg_count).toBe(60);
- var ascimg_count = (stdout.match(/URL/g) || []).length;
- expect(ascimg_count).toBe(8);
- var adr_count = (stdout.match(/ADR/g) || []).length;
- expect(adr_count).toBe(2);
+ expect(ascimg_count).toBe(30);
+ var url_count = (stdout.match(/\tURL\t/g) || []).length;
+ expect(url_count).toBe(4);
+ var adr_count = (stdout.match(/\tADR\t/g) || []).length;
+ expect(adr_count).toBe(1);
var lines_count = (stdout.split("\n")).length;
expect(lines_count).toBe(6202);
done();
@@ -54,13 +54,13 @@
const { execSync } = require('child_process');
const stdout = execSync('node src/index.js', { input: testInput }).toString();
- // Check that compound emojis are tagged as EMOIMG
- expect(stdout).toContain('✊🏿\t_\tEMOIMG\tEMOIMG');
- expect(stdout).toContain('👨👨👦\t_\tEMOIMG\tEMOIMG');
+ // Check that compound emojis are tagged as EMOIMG in XPOS column only
+ expect(stdout).toContain('✊🏿\t_\t_\tEMOIMG');
+ expect(stdout).toContain('👨👨👦\t_\t_\tEMOIMG');
- // Count EMOIMG occurrences (should be 2 for each emoji - columns 3 and 4)
+ // Count EMOIMG occurrences (should be 1 per emoji - only in XPOS column)
var emoimg_count = (stdout.match(/EMOIMG/g) || []).length;
- expect(emoimg_count).toBe(4); // 2 emojis × 2 columns = 4
+ expect(emoimg_count).toBe(2); // 2 emojis × 1 column = 2
done();
});
@@ -77,13 +77,13 @@
const { execSync } = require('child_process');
const stdout = execSync('node src/index.js', { input: testInput }).toString();
- // Check that Wikipedia emoji templates are tagged as EMOWIKI
- expect(stdout).toContain('[_EMOJI:{{S|;)}}_]\t_\tEMOWIKI\tEMOWIKI');
- expect(stdout).toContain('[_EMOJI:{{cool}}_]\t_\tEMOWIKI\tEMOWIKI');
+ // Check that Wikipedia emoji templates are tagged as EMOWIKI in XPOS column only
+ expect(stdout).toContain('[_EMOJI:{{S|;)}}_]\t_\t_\tEMOWIKI');
+ expect(stdout).toContain('[_EMOJI:{{cool}}_]\t_\t_\tEMOWIKI');
- // Count EMOWIKI occurrences (should be 2 for each template - columns 3 and 4)
+ // Count EMOWIKI occurrences (should be 1 per template - only in XPOS column)
var emowiki_count = (stdout.match(/EMOWIKI/g) || []).length;
- expect(emowiki_count).toBe(4); // 2 templates × 2 columns = 4
+ expect(emowiki_count).toBe(2); // 2 templates × 1 column = 2
done();
});
});