The jQuery .data() method is smart about recognizing boolean and numeric values and converts them into their native type. So this returns the boolean true, not "true":
$('#test').data('return');
If you want to get the raw data (without the automatic data conversion), you can use .attr():
$('#test').attr("data-return");
See the working test case here: http://jsfiddle.net/jfriend00/6BA8t/