Based on what Alex O has said, yes, the engine will fit in the frame. Now there's the swingarm issue and then what to do with electrics, exhaust, etc. Alex will probably chime in soon-ish. If ya don't get it, please tell me so I can buy it. THAT may eventually end up in Pongo. Who knows? ;D
the reason the s4 uses the st4's engine is because the heads are shorter than the "regular" 916 motor. same reasoning why the new s4R uses (mostly) the same motor as the st4S. head clearance. that said, i don't know enough about the dimmensions of the testastretta head. if it can clear the bottom of the gastank, and you don't have wheel/head contact if your forks bottom out, it'll fit!!!
but as chris mentioned, there's the need for a new swingarm, new exhaust, relocating the battery, rethinking the airbox, etc...
PLEASE contact me on where you found this motor!! if chris has "dibs" if you don't want to go through with this awesome (but rather involved) project, i'd love to have a line on a super-cheap motor! (this is assuming it's in good running condition?!)....
Hope y'all don't burn your hands when you pick up that motor...and don't get too attached to it, the rightful owner may be coming by your house at any time. Accompanied by a really serious dude with a gun and a shiny metal badge.
this sis going to be a long STRATI type of project hehehe
Its gonna take me some thinking....I'll definately be posting pics as well, as a how to guide.... lol hopefully I can pull this off with everyone'shelp here./......heck, I just learned how to swap plugs from you guys LOL