gjtorikian / mathematical

Convert mathematical equations to SVGs, PNGs, or MathML. A general wrapper to Lasem and mtex2MML.
https://gjtorikian.github.io/mathematical/
MIT License
164 stars 31 forks source link

Test BasicTest#test_mixed randomly fails #73

Closed jirutka closed 11 months ago

jirutka commented 7 years ago

Test BasicTest#test_mixed sometimes fails.

/usr/bin/ruby -w -I"lib:test" -I"/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/.gem/gems/rake-12.0.0/lib" "/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/.gem/gems/rake-12.0.0/lib/rake/rake_test_loader.rb" "test/mathematical/basic_test.rb" "test/mathematical/corrections_test.rb" "test/mathematical/delimiters_test.rb" "test/mathematical/fixtures_test.rb" "test/mathematical/maliciousness_test.rb" "test/mathematical/mathjax_test.rb" "test/mathematical/mathml_test.rb" "test/mathematical/multiples_test.rb" "test/mathematical/performance_test.rb" "test/mathematical/png_test.rb" 
/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/test/mathematical/corrections_test.rb:11: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/test/mathematical/corrections_test.rb:14: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/test/mathematical/maliciousness_test.rb:17: warning: assigned but unused variable - render
/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/test/mathematical/maliciousness_test.rb:21: warning: assigned but unused variable - render
/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/test/mathematical/maliciousness_test.rb:33: warning: assigned but unused variable - render
/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/test/mathematical/maliciousness_test.rb:131: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/test/mathematical/maliciousness_test.rb:149: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/lib/mathematical/validator.rb:8: warning: constant ::Fixnum is deprecated
/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/test/mathematical/multiples_test.rb:67: warning: assigned but unused variable - file_bytes
/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/lib/mathematical/validator.rb:8: warning: constant ::Fixnum is deprecated
Run options: --seed 58221

# Running:

............................................................................................................................................................................................................................Line: 5190 Error: syntax error, unexpected SUB at token _
Failed to parse mtex.Size of latex string is greater than the maxsize.Line: 5190 Error: syntax error, unexpected $end at token 
Failed to parse mtexFailed to create document...Line: 5190 Error: memory exhausted at token \sqrt
Failed to parse mtex.F......Failed to parse mtex........

Finished in 7.462514s, 32.2947 runs/s, 440.4682 assertions/s.

  1) Failure:
Mathematical::BasicTest#test_mixed [/home/buildozer/aports/testing/ruby-mathematical/src/mathematical-1.6.0/test/mathematical/delimiters_test.rb:56]:
--- expected
+++ actual
@@ -1 +1,2 @@
-"<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'><semantics><mrow><mi>&alpha;</mi></mrow><annotation encoding='application/x-tex'>\\alpha</annotation></semantics></math><math xmlns='http://www.w3.org/1998/Math/MathML' display='block'><semantics><mrow><mi>&beta;</mi></mrow><annotation encoding='application/x-tex'>\\beta</annotation></semantics></math>"
+# encoding: ASCII-8BIT
+"<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'><semantics><mrow><mi>&alpha;</mi></mrow><annotation encoding='application/x-tex'>\\Huge \\sqrt\\sqrt\\sqrt\\sqrt\\sqrt\\sqrt\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqr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\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt{\\sqrt\\alpha</annotation></semantics></math><math xmlns='http://www.w3.org/1998/Math/MathML' display='block'><semantics><mrow><mi>&beta;</mi></mrow><annotation encoding='application/x-tex'>\\beta</annotation></semantics></math>"

241 runs, 3287 assertions, 1 failures, 0 errors, 0 skips
4e554c4c commented 11 months ago

can not duplicate with the given seed. Perhaps a duplicate of #124 ?