Skip to content

Commit 5ecb7bc

Browse files
committed
test
1 parent c07a38e commit 5ecb7bc

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

test/compute-engine/latex-syntax/logic.test.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,18 @@ describe('Logic', () => {
701701
],
702702
]
703703
`);
704+
// With dot separator (no space after dot) - issue #157
705+
expect(ce.parse('\\forall x.x>0').json).toMatchInlineSnapshot(`
706+
[
707+
ForAll,
708+
x,
709+
[
710+
Greater,
711+
x,
712+
0,
713+
],
714+
]
715+
`);
704716
// With colon separator
705717
expect(ce.parse('\\forall x: x>0').json).toMatchInlineSnapshot(`
706718
[
@@ -750,6 +762,43 @@ describe('Logic', () => {
750762
`);
751763
});
752764

765+
// https://github.com/cortex-js/compute-engine/issues/157
766+
it('should parse ForAll with dot separator and no space (issue #157)', () => {
767+
expect(ce.parse('\\forall x.x\\in A').json).toMatchInlineSnapshot(`
768+
[
769+
ForAll,
770+
x,
771+
[
772+
Element,
773+
x,
774+
A,
775+
],
776+
]
777+
`);
778+
expect(ce.parse('\\forall x.x>0').json).toMatchInlineSnapshot(`
779+
[
780+
ForAll,
781+
x,
782+
[
783+
Greater,
784+
x,
785+
0,
786+
],
787+
]
788+
`);
789+
expect(ce.parse('\\exists y.y<10').json).toMatchInlineSnapshot(`
790+
[
791+
Exists,
792+
y,
793+
[
794+
Less,
795+
y,
796+
10,
797+
],
798+
]
799+
`);
800+
});
801+
753802
it('should parse Exists with body', () => {
754803
expect(ce.parse('\\exists x, x>0').json).toMatchInlineSnapshot(`
755804
[

0 commit comments

Comments
 (0)