rstudioapi::terminalSend() inserts newline but does not execute command on Windows

On Windows with RStudio 2026.07.1:

rstudioapi::terminalSend(id, "echo BONJOUR\n")

writes the command but does not execute it.

Using \r instead does execute it:

rstudioapi::terminalSend(id, "echo BONJOUR\r")

This fixes the downstream harness issue for me:

I’m not sure whether \n is still supposed to submit the command on Windows, since the rstudioapi docs still use \n in examples. Is this expected behavior with the current terminal backend?