My late mother kept a loaded Beretta 418 (6.35 cal) next to her bed for many many years. When she passed away I retrieved the gun to find it was impossible to for me to pull the slide and eject the round. My son helped me disengage the extractor and open the slide. Then with a small screw driver used as a lever and lots of WD40, I removed the round. I never thought of taking it outside and firing it; so, I don’t know if it would have ejected the casing.
It was a very wise decision to not fire the weapon. Shooting a malfunctioning gun is unsafe. You didn't even know if the bore was clear of obstructions; if not, the gun could explode in your hands.
There would be another unpleasant possibility too - you pull the trigger, you hear "click" and nothing happens. Now what? You have a live round in the barrel, with a dimpled primer, ready to go off at any time, from one second to ten years from now. And you can't eject that round. What do you do now?
Firearms need to be regularly checked, cleaned, oiled and preferrably fired to keep them in good working order. A few drops of oil every couple of months look like a great investment, considering how much good firearms cost.