Skip to content

Commit

Permalink
Add regression test for #534
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Aug 29, 2024
1 parent e11e0c0 commit 29a99e9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions numbat/tests/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ fn test_conversions() {
expect_output("5m^2 -> cm*m", "500 cm·m");
expect_output("1 kB / 10 ms -> MB/s", "0.1 MB/s");
expect_output("55! / (6! (55 - 6)!) -> million", "28.9897 million");

// regression test for https://github.com/sharkdp/numbat/issues/534
let mut ctx = get_test_context();
let _ = ctx
.interpret("let x = 1 deg", CodeSource::Internal)
.unwrap();
expect_output_with_context(&mut ctx, "12 deg -> x", "12°");
}

#[test]
Expand Down

0 comments on commit 29a99e9

Please sign in to comment.