1
/* Copyright (C) 2000 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
#include "mysys_priv.h"
18
const char *test_names[]=
20
"/usr/my/include/srclib/myfunc/dbug/test",
23
"/usr/my/srclib/myfunc/dbug/test",
24
"/usr/monty/oldcopy/jazz/setupp.frm",
31
"../../monty/rutedit",
32
"/usr/monty//usr/monty/rutedit",
33
"/usr/./monty/rutedit",
34
"/usr/my/../monty/rutedit",
37
"~/../my/srclib/myfunc/test",
38
"~/../my/srclib/myfunc/./dbug/test",
39
"/../usr/my/srclib/dbug",
45
int main(int argc __attribute__((unused)), char **argv)
48
char buff[FN_REFLEN],buff2[FN_REFLEN];
50
DBUG_PROCESS (argv[0]);
53
if (argv[1] && argv[1][1] == '#')
56
for (pos=test_names; *pos ; pos++)
58
printf("org : '%s'\n",*pos);
59
printf("pack: '%s'\n",fn_format(buff,*pos,"","",8));
60
printf("unpack: '%s'\n",fn_format(buff2,*pos,"","",4));
61
unpack_filename(buff,buff);
62
if (strcmp(buff,buff2) != 0)
64
printf("error on cmp: '%s' != '%s'\n",buff,buff2);