Trumbo and Goldschmidt had three hits apiece, and Blake Lalli singled in the winning run in the ninth. Lalli is trying to make the team as a backup catcher.
Trumbo played the whole game.
"Anytime that you can go more innings in spring, it's a good thing," he said. "It was nice to be able to get nine in and I was happy with the result, obviously."
Texas center fielder Delino DeShields had two hits, including a solo homer, and two RBIs, bolstering his case for a spot on the Rangers' opening-day roster. DeShields is 7 for 17 in his last four games.
Nick Martinez, who was recently selected for the fifth spot in Texas' rotation, was charged with six earned runs in 4 1/3 innings.
"I'm a pitcher that likes to establish his fastball," Martinez said. "I ran into a team that was hunting for a lot of fastballs and ambushing fastballs and seeing the fastball well."
Manager Chip Hale was happy with what he saw from Cahill.
"Electric sinker," Hale said. "That's what we've been seeing. We just need him to be consistent with it and trust it."
The Diamondbacks and catcher Gerald Laird agreed to a $100,000 retention bonus that gives the club an out clause for his contract by June 1. Laird is in the mix for the backup catcher role.
The bonus gives Arizona more time to decide on Laird, a 12-year veteran, and allows the team to send him to Triple-A Reno for a while if he does not break camp with the Diamondbacks.
"Obviously they haven't seen enough," Laird said, "so they're going to take another couple of days."
The 31-year-old Johnson hit .194 in 19 spring games for the Rangers. He is a .215 career hitter in 318 games with Tampa Bay, Kansas City, Atlanta and Cleveland.
Wright, 40, appeared in nine games for Texas in spring training and had a 7.50 ERA over 12 innings. He was trying to make the club as a long reliever.
Rangers: Martinez said he's ready to start the season.
"There are some positives to take out of this and also some things to learn," he said. "Good situation for me to play in my head when the season comes."
Diamondbacks: Anderson got the start over Cahill in a last-minute move. The two were named to the major league rotation this week.
"Felt a little off," Anderson said. "Other than that, curveball was good, my changeup was pretty good, just couldn't get in those counts and use those pitches more effectively. It's kind of the only bad outing I've had all spring, so I guess get it out of my system now and move on to the season."
Rangers: RHP Tanner Scheppers was in Texas on Tuesday for a scan on his sore right ankle. He reported soreness after his outing last Saturday. ... OF Shin-Soo Choo (left triceps inflammation) was scheduled to start in right field in the Rangers' other split-squad game. ... RHP Shawn Tolleson (right forearm stiffness) was scheduled to pitch in a minor league game Tuesday.