Discrete (non-lattice) distributions related to rank tests