Currently I was using Ant with TestNG, please take note that when taskdef was missing in the code, the error is misleading.
<taskdef name="testng" classpathref="compilePath" classname="org.testng.TestNGAntTask" />
Below are the error generated:
I am writing this blog because I'm feeling bore. I make this blog as my personal development journal tracking my fault and mistake.
Currently I was using Ant with TestNG, please take note that when taskdef was missing in the code, the error is misleading.
<taskdef name="testng" classpathref="compilePath" classname="org.testng.TestNGAntTask" />
Below are the error generated:
Foo *p; p = new(std::nothrow) Foo(); if( !p ) { exit(1); }
struct stat FileStat;
if( stat( "MyFile", &FileStat ) == 0 ) { cout << FileStat.st_size << endl; }
huahsin68@huahsin68-laptop:~/Development/TestLab$ ls -l total 12 drwxr-xr-x 3 huahsin68 huahsin68 4096 2010-06-12 19:45 Debug -rw-r--r-- 1 huahsin68 huahsin68 241 2010-03-27 15:00 MyLog.000.txt drwxr-xr-x 4 huahsin68 huahsin68 4096 2010-03-27 12:19 srcthe same thing can be done using popen(), each line of the output will be direct to FILE pointer. Use fgets() to retrieve each line of the output. Below is the sample code:
FILE *fp; char line[130]; fp = popen("ls -l", "r"); while ( fgets( line, sizeof line, fp)) { printf("%s", line); } pclose(fp);