Reversal test, how do you “know” they want to live?
Alternatively you could argue that they still get out of bed and eat and engage, and perhaps these are signs enough of some desire to live. Anyway, I think there are some philosophical complications which require exploration.