Created by: xyzhou-puck
add unit-test for PR #19942
https://github.com/PaddlePaddle/Paddle/pull/19942