Commit eabee1e7 authored by User expired's avatar User expired
Browse files

Add and fix test for bad formatting

parent 757eaccb
Pipeline #68542 failed with stage
in 48 seconds
......@@ -44,8 +44,8 @@ fi
# Replace '{\"a}' and '\"a' to '\"{a}'.
FORMAT="
s/{\\\\\(['\`\"^v]\)\([^ {]\)}/\\\\\1{\2}/g
s/\\\\\(['\`\"^v]\)\([^ {]\)/\\\\\1{\2}/g
s/{\\\\\(['\`\"^v]\)\([^ {\\]\)}/\\\\\1{\2}/g
s/\\\\\(['\`\"^v]\)\([^ {\\]\)/\\\\\1{\2}/g
"
# Minimum single quote list of replacements.
......
......@@ -44,8 +44,8 @@ fi
# Replace '{\"a}' and '\"a' to '\"{a}'.
FORMAT="
s/{\\\\\(['\`\"^v]\)\([^ {]\)}/\\\\\1{\2}/g
s/\\\\\(['\`\"^v]\)\([^ {]\)/\\\\\1{\2}/g
s/{\\\\\(['\`\"^v]\)\([^ {\\]\)}/\\\\\1{\2}/g
s/\\\\\(['\`\"^v]\)\([^ {\\]\)/\\\\\1{\2}/g
"
# Minimum single quote list of replacements.
......
......@@ -70,6 +70,8 @@ testAccentsToLatex() {
check_unicode "\\'{c}" "\\'c"
check_unicode "\\'{n}" "\\'n"
check_unicode "\\'{y}" "\\'y"
# Avoid formatting mistakes.
check_unicode "Escart{\'\i}n" "Escart{\'\i}n" # must not put \'{\}
}
# Load and run shUnit2.
......
......@@ -73,6 +73,8 @@ testAccentsToUnicode() {
check_latex "\\'c" "ć"
check_latex "\\'n" "ń"
check_latex "\\'y" "ý"
# Avoid formatting mistakes.
check_latex "Escart{\'\i}n" "Escart{\'\i}n" # must not put \'{\}
}
# Load and run shUnit2.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment