http://en.wikipedia.org/wiki/Diamond says no, and I've no reason to doubt them.
Diamonds cut glass, but this does not positively identify a diamond
because other materials, such as quartz, also lie above glass on the
Mohs scale and can also cut it.
Of course this doesn't cover artificial diamonds per se, which I think you're referring to. Those can indeed have different properties from "real" diamonds http://en.wikipedia.org/wiki/Synthetic_diamond
The properties of synthetic diamond depend on the details of the
manufacturing processes, and can be inferior or superior to those of
natural diamond; the hardness, thermal conductivity and electron
mobility are superior in some synthetic diamonds (either HPHT or CVD)
The method used to identify synthetics from natural is apparently quite different:
The appearance of synthetic gems on the market created major concerns
in the diamond trading business, as a result of which special
spectroscopic devices and techniques have been developed to
distinguish synthetic and natural diamonds.
Synthetic diamond is the hardest material known,[53] where hardness is
defined as resistance to scratching and is graded between 1 (softest)
and 10 (hardest) using the Mohs scale of mineral hardness
references http://nanoscan.info/wp-content/publications/article_03.pdf which compares hardness of fullerite (synthetic diamond) to natural diamond, concluding indeed that
Hardness and wear of ultra- and superhard fullerites and diamond were
measured in the present study. The diamond surface (111) was deformed
as a plastic material under the scratching with the ultrahard
fullerite C60 indenter. This indicates that the hardness of ultra-hard
fullerite is sufficient to create a high pressure in the contact point
for the plastic flow of diamond at room temperature and it exceeds the
hardness of diamond.
So no, a simple test of scratching glass won't identify a synthetic diamond from a natural one. In fact the synthetic may well scratch things the natural one can't scratch!
Of course other materials may be used to try to fool people into believing they're holding a diamond. Wikipedia mentions that
A diamond simulant is a non-diamond material that is used to simulate
the appearance of a diamond, and may be referred to as diamante. Cubic
zirconia is the most common.
materials that may well be less hard than diamond (and maybe giving rise to the myth, as hinted at in the same article).
Early diamond identification tests included a scratch test relying on
the superior hardness of diamond. This test is destructive, as a
diamond can scratch diamond, and is rarely used nowadays.
The Wikipedia article on diamond is surprisingly well referenced and worth reading.