added test to validate mode
added tests for octave isnumeric and is in the range of 1 to 8