Wal-Mart Stores is running a price-comparison test in at least 1,200 U.S. stores in a bid to close a pricing gap with rivals.