Currently, test-renewal of current live memberhips makes them stay live (i.e., with is_test = 0), while test-renewal of expired live memberships makes them disappear from the Memberships tab (by making them is_test = 1). The consistent approach should be this:
Before renewing an existing membership the match should be done on both membership type and is_test state, so test-renewals can only renew test memberships and live renewals can only renew live memberships.
If the membership type matches the renewal type and is_test matches the renewal mode (test renewal and is_test = 1 or live renewal and is_test = 0), then a renewal should be performed. Otherwise, a new membership should be recorded, of the right type and is_test flag set according to the renewal mode (1 for test renewal, 0 for live renewal).
This means that a contact can have up to two memberships of a given type, one with is_test = 0 and one with is_test = 1.