Skip to content

Commit 6557ba4

Browse files
committed
Added test verifying proper behavior for modulus operator.
1 parent 14b011a commit 6557ba4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/src/databases/all/expr.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,16 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
357357
}
358358
);
359359

360+
it('uses the correct symbol for modulus, either % or MOD', async () => {
361+
await expect(`
362+
run: aircraft_models->{
363+
group_by: mod_example is 10 % 4
364+
}
365+
`).malloyResultMatches(expressionModel, {
366+
mod_example: 2,
367+
});
368+
});
369+
360370
it('named query metadata undefined', async () => {
361371
const result = await expressionModel
362372
.loadQuery(

0 commit comments

Comments
 (0)