test_stack: add unit test