ch 19, eunit: Why use ?cmd("rm filename") instead of file:delete("filename")
31 views
Skip to first unread message
Steven Wicklund
unread,
Jun 7, 2010, 6:19:39 PM6/7/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Erlang Programming
In chapter 19 the eunit tests use the ?cmd() macro instead of
file:delete/1. Why is this? I was getting a test exception using
this syntax(enoent) that went away when I switched to delete.
Some weirdness here: ?cmd is described as being OS dependent - I run
on Win7 so I tried using the "del" command to no avail, but now I
notice that several other tests use the ?cmd("rm ...") notation
successfully. Is ?cmd in fact OS specific, or will it translate a "rm
filename" to "del filename" on Windows?
Steven Wicklund
unread,
Jun 8, 2010, 9:57:35 AM6/8/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Erlang Programming
I figured out what that I was writing my test cases improperly and
that the ?cmd("rm...") fails every time.