My question is this - How does the compiler know how much memory to allocate for that last String variable ?
Probably 6 bytes, consisting of a pointer to a buffer, a length, and a capacity. The actual string data ("test" or whatever) isn't included; that gets dynamically allocated "later."
BillW-MacOSX-2<9994> avr-gdb StringAppendOperator.ino.elf
GNU gdb (AVR_8_bit_GNU_Toolchain_3.6.1_495) 7.8
(gdb) print sizeof(stringOne)
$1 = 6
(gdb)