The battle of Salamis where the Greek defeated the Persians was definitely considered a success at the time, not a failure because they didn't get to die heroically every last man!
But in case of a defeat it is common to spin it as some kind of moral victory. Just see how the British spun the defeat at Dunkerque in the beginning of WWII. But that does not mean they didn't care about winning.