(* TESTS FOR readSep *)

(* Empty Integer Lists *)
List.readSep "" "" "" Int.read InStream.stdIn;

	(* OK [] *)
List.readSep "" "" "" Int.read InStream.stdIn;
 	(* whitespace *) 
	(* OK [] *)
List.readSep "[" "]" "" Int.read InStream.stdIn;
[]
	(* OK [] *)
List.readSep "[" "]" "," Int.read InStream.stdIn;
 [ ]
	(* OK [] *)
List.readSep "" "]" "" Int.read InStream.stdIn;
]
	(* OK [] *)
List.readSep "" "]" " " Int.read InStream.stdIn;
 ]
	(* OK [] *)
List.readSep "" "]" "" Int.read InStream.stdIn;
 ]
	(* Fail (Some []) *)
List.readSep "[" "" "" Int.read InStream.stdIn;
[
	(* OK [] *)
List.readSep "[" "" "" Int.read InStream.stdIn;
 [
	(* OK [] *)
List.readSep "[" "" "" Int.read InStream.stdIn;
[ 
	(* OK [] *)


(* Non-empty Integer Lists *)
List.readSep "" "" "" Int.read InStream.stdIn;
 1
	(* OK [1] *)
List.readSep "" "" " " Int.read InStream.stdIn;
 1 2
	(* OK [1 2] *)
List.readSep "" "" "" Int.read InStream.stdIn;
 1 2
	(* OK [1 2] *)
List.readSep "[" "]" "" Int.read InStream.stdIn;
 [ 1 ]
	(* Fail (Some [1]) *)
List.readSep "[" "]" "" Int.read InStream.stdIn;
 [ 1 
	(* Fail (Some [1]) *)
List.readSep "" "]" "," Int.read InStream.stdIn;
 1, 2]
	(* OK [1 2] *)
List.readSep "" "," "," Int.read InStream.stdIn;
 1, 2
	(* Fail (Some [1 2]) *)
List.readSep "" "," "," Int.read InStream.stdIn;
 1, 2,
	(* OK [1 2] *)


(* Byte Lists *)
List.readSep "" "]" "" Byte.read InStream.stdIn;
 ]
	(* OK [" "] *)
List.readSep "[" "]" "" Byte.read InStream.stdIn;
 [ 1 ]
	(* OK [" ". "1", " "] *)
List.readSep "" "," "," Byte.read InStream.stdIn;
 1, 2,
	(* OK ["1", "2"] *)


(* TESTS FOR readSepN *)

(* Empty Lists *)
List.readSepN "" "" "" Int.read 0 InStream.stdIn;

	(* OK [] *)
List.readSepN "" "" "" Int.read 0 InStream.stdIn;
 1
	(* OK [] *)
List.readSepN "[" "]" "" Int.read 0 InStream.stdIn;
[]
	(* OK [] *)
List.readSepN "[" "]" " " Int.read 0 InStream.stdIn;
 [ ]1
	(* OK [] *)
List.readSepN "[" "]" "" Int.read 0 InStream.stdIn;
 [ ]1
	(* Fail (Some []) *)
List.readSepN "[" "]" "," Int.read 0 InStream.stdIn;
 [ ]1
	(* OK [] *)
List.readSepN "" "]" "" Int.read 0 InStream.stdIn;
]1
	(* OK [] *)
List.readSepN "" "]" " " Int.read 0 InStream.stdIn;
 ]1
	(* OK [] *)
List.readSepN "" "]" "" Int.read 0 InStream.stdIn;
 ]1
	(* Fail (Some []) *)
List.readSepN "[" "" "" Int.read 0 InStream.stdIn;
[
	(* OK [] *)
List.readSepN "[" "" "" Int.read 0 InStream.stdIn;
 [
	(* OK [] *)
List.readSepN "[" "" "" Int.read 0 InStream.stdIn;
[ 
	(* OK [] *)
List.readSepN "" "" "" Int.read 1 InStream.stdIn;

	(* Fail (Some []) *)
List.readSepN "[" "" "" Int.read 1 InStream.stdIn;
[ 
	(* Fail (Some []) *)


(* Non-empty Lists *)
List.readSepN "" "" "" Int.read 1 InStream.stdIn;
 1
	(* OK [1] *)
List.readSepN "" "" "" Int.read 2 InStream.stdIn;
 1
	(* Fail (Some [1]) *)
List.readSepN "" "" "" Int.read 2 InStream.stdIn;
 1 2
	(* OK [1 2] *)
List.readSepN "" "" "" Int.read 1 InStream.stdIn;
 1 2
	(* OK [1] *)
List.readSepN "[" "]" " " Int.read 1 InStream.stdIn;
 [ 1]
	(* OK [1] *)
List.readSepN "[" "]" "" Int.read 1 InStream.stdIn;
 [ 1 ]
	(* Fail (Some [1]) *)
List.readSepN "[" "]" "" Int.read 1 InStream.stdIn;
 [ 1 
	(* Fail (Some [1]) *)
List.readSepN "" "," "," Int.read 2 InStream.stdIn;
 1, 2
	(* Fail (Some [1 2]) *)
List.readSepN "" "" "," Int.read 2 InStream.stdIn;
 1, 2,
	(* OK [1 2] *)
List.readSepN "" "," "," Int.read 2 InStream.stdIn;
 1, 2,
	(* OK [1 2] *)



