I have been to a Schengen country in 2nd semester 2022. It required me no COVID test or vaccine to enter it.
On my way back to my home country, when checking-in, I was requested by the airline agent for either vaccination or negative COVID test — as I later found out, accurately so: I checked my country rules and that was a requirement for entrance (nothing specific about the means of entrance, just "entrance" in general), even for nationals.
I was caught by surprise and it was a bit of a hassle to get my electronic vaccination card, but all worked out fine in the end.
Yet, this left me wondering: Suppose I had no vaccine nor negative COVID test and that I furthermore refused to take either.
Since I had only a short-term entrance allowance (90 days), after its expiration, I'd no longer be there legally and something would have to happen. But what?
I suppose the host country couldn't force me to take test or vaccine. Would it deport me back to my home country, thus overriding the latter's rules? Is there any international general rule that would apply?
PS: I emphasize that, as said in paragraph 2, the denial was not originated from the airline (which by the way was the same on the way forward and on the way back). It was just abiding by my governments instructions.