mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-24 05:04:10 +08:00
add libc testcase.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1061 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* env.c
|
||||
*
|
||||
* Created on: 2010-11-17
|
||||
* Author: bernard
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <finsh.h>
|
||||
|
||||
int libc_env()
|
||||
{
|
||||
printf("PATH=%s\n", getenv("PATH"));
|
||||
putenv("foo=bar");
|
||||
printf("foo=%s\n", getenv("foo"));
|
||||
return 0;
|
||||
}
|
||||
FINSH_FUNCTION_EXPORT(libc_env, get/set_env test);
|
||||
Reference in New Issue
Block a user