add test + fix bug for tail=integer
6.8.2