wavwrite with 32 bits per sample seems to overflow?
It seems like it is a bug. Octave's wavwrite() function writes 32-bit wav in 32 bits int (type 1 format) instead of normalized 32-bit floats (type 3 format). Unfortunately, 1 can't be represented in 32-bit type 1 format which is why you get this result.
The solution could be to use the audiowrite() function, or to write 0x7fffffff instead of 1.
More about wav formats.
EDIT: seems from the bug report that the audiowrite function has the same problem...