I'm in the UK and I have, a few times, picked up a can of coke because I was thirsty and opened it while in the store, gone and grabbed more items and then scanned everything (including the coke I drank a bit of) through. It isn't illegal.
British law is all about intent, if I intend to deprive the store of that can of coke then it is indeed theft. However, if I drink a little bit before paying it doesn't. The store have to prove I intended to deprive them of it (which I wouldn't do)