msvcrt _tempnam and tests

Phil Lodwick Phil.Lodwick at EFI.COM
Wed Nov 9 12:26:45 CST 2005


I submitted a patch yesterday for the implementation of _tempnam in msvcrt.
Today I started to write a conformance test which has led to several
questions.

1) What action should we take if MS documentation and the implementation do
not agree?

	a) leave out the test
	b) test to implementation

2) If a function takes several parameters, do you test all permutations, or
just the ones you feel are important?

3) This question is specific to the implementation of _tempnam.  The current
implementation just calls GetTempFileNameA.  My first attempt at a patch made
things better by calling GetTempFileNameA with better parameters.  After
writing the conformance test, however, I see that calling GetTempFileNameA is
just plain wrong -- for at least two reasons:

	a) GetTempFileNameA truncates prefix to 3 characters, _tempnam does
not
	b) GetTempFileNameA adds a ".tmp" extension, _tempnam does not.

Do we just duplicate and modify the kernel TempFileNameA code in msvcrt?

Thanks,
Phil



More information about the wine-devel mailing list