// LaTeX tests for the basic mathml tags.
// These come from three pages:
// https://augenbit.de/wiki/index.php?title=LaTeX-Manual_LaTeX_Grundregeln
// https://augenbit.de/wiki/index.php?title=LaTeX-Manual_Sekundarstufe_1
// https://augenbit.de/wiki/index.php?title=LaTeX-Manual_Sekundarstufe_2
// The names of the tests refer to these as augenbit0, augenbit1, and augenbit2.
// Each table on the page are numbered starting at 1, and then the examples in the table are numbered.
// Thus the first example on the first page is named "augenbit0_1_1" and the "a_{12}" example on that pages is "augenbit0_2_6".
// This naming scheme makes it easy to find the source of the example and what the translation should be.
use crate::common::*;
#[test]
fn augenbit1_1_1 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"{1, 2, 3, 4}");
}
#[test]
fn augenbit1_2_3 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"ZZ_0^-");
}
#[test]
fn augenbit1_3_2 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"9-3 != 5");
}
#[test]
fn augenbit1_3_3 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"x+-3");
}
#[test]
fn augenbit1_3_6 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"x <= 10");
}
#[test]
fn augenbit1_3_10 () {
let expr = r#""#;
test_braille_prefs("ASCIIMath", vec![("DecimalSeparators", ","), ("BlockSeparators", ". ")], expr, r"pi ~~ 3,14");
}
#[test]
fn augenbit1_3_14 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"a hat=b");
}
#[test]
fn augenbit1_5_2 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"1/x");
}
#[test]
fn augenbit1_5_7 () {
// put number together -- editor created "0,1" and canonicalize didn't fix it
let expr = r#""#;
test_braille("ASCIIMath", expr, r"0,1 bar 6 = 1//6");
}
#[test]
fn augenbit1_5_8 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"75% = 3//4");
}
#[test]
fn augenbit1_6_8 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"root(3)(a^2) = a^(2//3)");
}
#[test]
fn augenbit1_6_11() {
// this is a slightly cleaned up version that comes for the original example (via MathJax)
let expr = r#" "#;
test_braille("ASCIIMath", expr, r"\ _(95)^(238)U");
}
#[test]
fn augenbit1_7_7 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"log_a x");
}
#[test]
fn augenbit1_7_10 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"cos^2 beta");
}
#[test]
fn augenbit1_7_12 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"cot 45°");
}
#[test]
fn augenbit1_8_2 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"/_\ABC");
}
#[test]
fn augenbit1_8_4 () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"alpha, beta, gamma, delta, epsilon");
}
#[test]
fn augenbit2_1_3 () {
// original display code contains forced spaces not in the output -- they are cleaned up here
let expr = r#""#;
test_braille("ASCIIMath", expr, r"lim_(x->x_0)");
}
#[test]
fn augenbit2_1_4 () {
// original display code contains forced spaces not in the output -- they are cleaned up here
let expr = r#""#;
test_braille("ASCIIMath", expr, r"f'(x), f''(x)");
}
#[test]
fn augenbit2_2_2 () {
// original display code contains forced spaces not in the output -- they are cleaned up here
let expr = r#""#;
test_braille("ASCIIMath", expr, r"((n), (k))");
}
#[test]
fn augenbit2_3_2 () {
let expr = r#""#;
// set number preferences to European style
test_braille_prefs("ASCIIMath", vec![("DecimalSeparators", ","), ("BlockSeparators", ". ")], expr,
r"vec q = ([-5], [0,5], [k+4])");
}
#[test]
fn augenbit2_3_4 () {
let expr = r#""#;
// set number preferences to European style
test_braille_prefs("ASCIIMath", vec![("DecimalSeparators", ","), ("BlockSeparators", ". ")], expr,
r"([a, b, c], [d, e, f])");
}