diff options
author | Jacek Antonelli | 2008-08-15 23:44:56 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:56 -0500 |
commit | c07901e29ed545bbb02e3bddf148fe1104b94e9f (patch) | |
tree | f1ada64ce834acd7d92a425efb96c4b86bcf16b1 /linden/indra/test/llxfer_tut.cpp | |
parent | Second Life viewer sources 1.15.0.2 (diff) | |
download | meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.zip meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.gz meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.bz2 meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.xz |
Second Life viewer sources 1.15.1.3
Diffstat (limited to 'linden/indra/test/llxfer_tut.cpp')
-rw-r--r-- | linden/indra/test/llxfer_tut.cpp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/linden/indra/test/llxfer_tut.cpp b/linden/indra/test/llxfer_tut.cpp new file mode 100644 index 0000000..c4665c9 --- /dev/null +++ b/linden/indra/test/llxfer_tut.cpp | |||
@@ -0,0 +1,61 @@ | |||
1 | /** | ||
2 | * @file llxfer_tut.cpp | ||
3 | * @author Moss | ||
4 | * @date 2007-04-17 | ||
5 | * | ||
6 | * Copyright (c) 2007-2007, Linden Research, Inc. | ||
7 | * | ||
8 | * Second Life Viewer Source Code | ||
9 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
10 | * to you under the terms of the GNU General Public License, version 2.0 | ||
11 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
12 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
13 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
14 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
15 | * | ||
16 | * There are special exceptions to the terms and conditions of the GPL as | ||
17 | * it is applied to this Source Code. View the full text of the exception | ||
18 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
19 | * online at http://secondlife.com/developers/opensource/flossexception | ||
20 | * | ||
21 | * By copying, modifying or distributing this software, you acknowledge | ||
22 | * that you have read and understood your obligations described above, | ||
23 | * and agree to abide by those obligations. | ||
24 | * | ||
25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
27 | * COMPLETENESS OR PERFORMANCE. | ||
28 | */ | ||
29 | |||
30 | #include "linden_common.h" | ||
31 | #include "lltut.h" | ||
32 | |||
33 | #include "llxfer_file.h" | ||
34 | |||
35 | #include <string> | ||
36 | |||
37 | namespace tut | ||
38 | { | ||
39 | struct llxfer_data | ||
40 | { | ||
41 | }; | ||
42 | typedef test_group<llxfer_data> llxfer_test; | ||
43 | typedef llxfer_test::object llxfer_object; | ||
44 | tut::llxfer_test llxfer("llxfer"); | ||
45 | |||
46 | template<> template<> | ||
47 | void llxfer_object::test<1>() | ||
48 | { | ||
49 | // test that he handle an oversized filename correctly. | ||
50 | LLString oversized_filename; | ||
51 | U32 i; | ||
52 | for (i=0; i<LL_MAX_PATH*2; ++i) // create oversized filename | ||
53 | { | ||
54 | oversized_filename += 'X'; | ||
55 | } | ||
56 | |||
57 | LLXfer_File xff(oversized_filename, FALSE, 1); | ||
58 | ensure("oversized local_filename nul-terminated", | ||
59 | strnlen(xff.getName(), LL_MAX_PATH) < LL_MAX_PATH); | ||
60 | } | ||
61 | } | ||