Curve test for enhanced ind-sheaves and holonomic $D$-modules, I