Aniline is aromatic primary amine.
Aliphatic or aromatic primary amines on heating with chloroform and alcoholic KOH give foul smelling alkyl isocyanides or carbylamines. Secondary or tertiary amines do not give this test.
C6H5−NH2+CHCl3+3KOHΔ−→C6H5−NC+3KCl+3H2O
N, N-dimethylaniline is a tertiary amine and do not give this test.