TESTS: added regression tests for issue #785.
TESTS: added regression tests for issue #785.

red-eco/red,NikolayShubenkovProgSchool/red,NikolayShubenkovProgSchool/red,rheber/red,red-eco/red,vehar/red,rheber/red,vehar/red