1 module tests.ut.dub_json;
2 
3 
4 import unit_threaded;
5 import reggae;
6 import reggae.dub.json;
7 import std.string;
8 
9 @("PACKAGE_DIR")
10 unittest {
11     const jsonString = q{
12         {
13             "packages": [
14                 {
15                     "name": "lepackage",
16                     "path": "/dub/packages/lepackage",
17                     "dflags": [],
18                     "lflags": ["-L$PACKAGE_DIR"],
19                     "importPaths": ["$PACKAGE_DIR/imports"],
20                     "stringImportPaths": ["$PACKAGE_DIR/stringImports"],
21                     "files": [
22                         {"role": "source", "path": "$PACKAGE_DIR/foo.o"},
23                         {"role": "source", "path": "src/file.d"}
24                     ]
25                 },
26                 {
27                     "name": "dep",
28                     "path": "/dub/packages/dep",
29                     "dflags": [],
30                     "lflags": [],
31                     "importPaths": [],
32                     "stringImportPaths": [],
33                     "files": [
34                         {"role": "source", "path": "$PACKAGE_DIR/bar.o"},
35                         {"role": "source", "path": "src/dep.d"}
36                     ]
37                 }
38             ]
39         }
40     };
41 
42     getDubInfo(jsonString).shouldEqual(
43         DubInfo(
44             [
45                 DubPackage(
46                     "lepackage",
47                     "/dub/packages/lepackage",
48                     "", // mainSourceFile
49                     "", // targetFileName
50                     [], // dflags
51                     ["-L/dub/packages/lepackage"],
52                     ["/dub/packages/lepackage/imports"],
53                     ["/dub/packages/lepackage/stringImports"],
54                     ["/dub/packages/lepackage/foo.o", "src/file.d"],
55                     "", // targetType
56                     [], // versions
57                     [], // dependencies
58                     [], // libs
59                     true, // active
60                 ),
61                 DubPackage(
62                     "dep",
63                     "/dub/packages/dep",
64                     "", // mainSourceFile
65                     "", //targetFileName
66                     [], // dflags
67                     [], // lflags
68                     [], // importPaths
69                     [], // stringImportPaths
70                     ["/dub/packages/dep/bar.o", "src/dep.d"],
71                     "", // targetType
72                     [], // versions
73                     [], // dependencies
74                     [], // libs
75                     true, // active
76                 ),
77             ]
78     ));
79 
80 
81 }
82 
83 immutable jsonString =
84     `WARNING: A deprecated branch based version specification is used for the dependency unit-threaded. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.` ~
85     `{` ~
86     `  "packages": [` ~
87     `    {` ~
88     `      "targetType": "executable",` ~
89     `      "path": "/path/to/pkg1",` ~
90     `      "name": "pkg1",` ~
91     `      "mainSourceFile": "src/boooo.d",` ~
92     `      "targetFileName": "super_app",` ~
93     `      "dflags": [],` ~
94     `      "lflags": ["-L$LIB_DIR1", "-L$LIB_DIR2"],` ~
95     `      "versions": ["v1", "v2"],` ~
96     `      "dependencies": ["pkg_other"],` ~
97     `      "importPaths": ["leimports"],` ~
98     `      "stringImportPaths": [` ~
99     `        "src/string_imports",` ~
100     `        "src/moar_stringies"` ~
101     `      ],` ~
102     `      "active": true,` ~
103     `      "preBuildCommands": ["dub run dtest"],` ~
104     `      "files": [` ~
105     `        {` ~
106     `          "path": "src/foo.d",` ~
107     `          "type": "source"` ~
108     `        },` ~
109     `        {` ~
110     `          "path": "src/bar.d",` ~
111     `          "type": "source"` ~
112     `        },` ~
113     `        {` ~
114     `          "path": "src/boooo.d",` ~
115     `          "type": "source"` ~
116     `        }` ~
117     `      ]` ~
118     `    },` ~
119     `    {` ~
120     `      "path": "/weird/path/pkg_other",` ~
121     `      "name": "pkg_other",` ~
122     `      "importPaths": [` ~
123     `        "my_imports",` ~
124     `        "moar_imports"` ~
125     `      ],` ~
126     `      "dflags": [` ~
127     `        "-g", "-debug"` ~
128     `      ],` ~
129     `      "lflags": [],` ~
130     `      "libs": ["liblib", "otherlib"],` ~
131     `      "versions": ["v3", "v4"],` ~
132     `      "stringImportPaths": [],` ~
133     `      "active": true,` ~
134     `      "files": [` ~
135     `        {` ~
136     `          "path": "source/toto.d",` ~
137     `          "type": "source"` ~
138     `        },` ~
139     `        {` ~
140     `          "path": "source/africa.d",` ~
141     `          "type": "source"` ~
142     `        },` ~
143     `        {` ~
144     `          "path": "source/africa.d",` ~
145     `          "type": "weirdo"` ~
146     `        }` ~
147     `      ]` ~
148     `    }` ~
149     `  ]` ~
150     `}`;
151 
152 
153 void testJsonToDubDescribe() {
154     auto info = getDubInfo(jsonString.dup);
155     info.shouldEqual(
156         DubInfo(
157             [DubPackage("pkg1", "/path/to/pkg1", "src/boooo.d", "super_app",
158                         [],
159                         ["-L$LIB_DIR1", "-L$LIB_DIR2"],
160                         ["leimports"],
161                         ["src/string_imports", "src/moar_stringies"],
162                         ["src/foo.d", "src/bar.d", "src/boooo.d"],
163                         "executable", ["v1", "v2"], ["pkg_other"], [], true, ["dub run dtest"]),
164 
165              DubPackage("pkg_other", "/weird/path/pkg_other", "", "",
166                         ["-g", "-debug"],
167                         [],
168                         ["my_imports", "moar_imports"],
169                         [],
170                         ["source/toto.d", "source/africa.d"],
171                         "", ["v3", "v4"], [], ["liblib", "otherlib"], true)]));
172 }
173 
174 @("DubInfo.toTargets with -unittest")
175 unittest {
176     import reggae.config: setOptions, options;
177     import reggae.options: getOptions;
178 
179     auto oldOptions = options;
180     scope(exit) setOptions(oldOptions);
181     setOptions(getOptions(["reggae", "--per_module", "/tmp/proj"]));
182 
183     auto info = getDubInfo(jsonString.dup);
184     info.toTargets(Yes.main, "-unittest")[0].shouldEqual(
185         Target("path/to/pkg1/src/foo.o",
186                Command(CommandType.compile,
187                        assocListT("includes", ["-I/path/to/pkg1/leimports",
188                                                "-I/weird/path/pkg_other/my_imports",
189                                                "-I/weird/path/pkg_other/moar_imports",
190                                                "-I/tmp/proj"],
191                                   "flags", ["-version=v1", "-version=v2", "-version=v3", "-version=v4", "-unittest"],
192                                   "stringImports", ["-J/path/to/pkg1/src/string_imports",
193                                                     "-J/path/to/pkg1/src/moar_stringies"],
194                                   "DEPFILE", ["path/to/pkg1/src/foo.o.dep"])),
195                Target("/path/to/pkg1/src/foo.d")),
196     );
197 
198     info.toTargets(Yes.main, "-unittest")[3].shouldEqual(
199         Target("weird/path/pkg_other/source/toto.o",
200                Command(CommandType.compile,
201                        assocListT("includes", ["-I/path/to/pkg1/leimports",
202                                                "-I/weird/path/pkg_other/my_imports",
203                                                "-I/weird/path/pkg_other/moar_imports",
204                                                "-I/tmp/proj"],
205                                   "flags", ["-g", "-debug", "-version=v1", "-version=v2", "-version=v3", "-version=v4"],
206                                   "stringImports", cast(string[])[],
207                                   "DEPFILE", ["weird/path/pkg_other/source/toto.o.dep"])),
208                Target("/weird/path/pkg_other/source/toto.d")),
209     );
210 }
211 
212 void testDubInfoToTargets() {
213     import reggae.config: setOptions, options;
214     import reggae.options: getOptions;
215 
216     auto oldOptions = options;
217     scope(exit) setOptions(oldOptions);
218 
219     setOptions(getOptions(["reggae", "--per_module", "/tmp/proj"]));
220 
221     auto info = getDubInfo(jsonString.dup);
222     info.toTargets[0].shouldEqual(
223         Target("path/to/pkg1/src/foo.o",
224                Command(CommandType.compile,
225                        assocListT("includes", ["-I/path/to/pkg1/leimports",
226                                                "-I/weird/path/pkg_other/my_imports",
227                                                "-I/weird/path/pkg_other/moar_imports",
228                                                "-I/tmp/proj"],
229                                   "flags", ["-version=v1", "-version=v2", "-version=v3", "-version=v4"],
230                                   "stringImports", ["-J/path/to/pkg1/src/string_imports",
231                                                     "-J/path/to/pkg1/src/moar_stringies"],
232                                   "DEPFILE", ["path/to/pkg1/src/foo.o.dep"])),
233                Target("/path/to/pkg1/src/foo.d")),
234     );
235     info.toTargets[2].shouldEqual(
236         Target("path/to/pkg1/src/boooo.o",
237                Command(CommandType.compile,
238                        assocListT("includes", ["-I/path/to/pkg1/leimports",
239                                                "-I/weird/path/pkg_other/my_imports",
240                                                "-I/weird/path/pkg_other/moar_imports",
241                                                "-I/tmp/proj"],
242                                   "flags", ["-version=v1", "-version=v2", "-version=v3", "-version=v4"],
243                                   "stringImports", ["-J/path/to/pkg1/src/string_imports",
244                                                     "-J/path/to/pkg1/src/moar_stringies"],
245                                   "DEPFILE", ["path/to/pkg1/src/boooo.o.dep"])),
246                Target("/path/to/pkg1/src/boooo.d")),
247         );
248 
249     info.toTargets(No.main)[2].shouldEqual(
250         Target("weird/path/pkg_other/source/toto.o",
251                Command(CommandType.compile,
252                        assocListT("includes", ["-I/path/to/pkg1/leimports",
253                                                "-I/weird/path/pkg_other/my_imports",
254                                                "-I/weird/path/pkg_other/moar_imports",
255                                                "-I/tmp/proj"],
256                                   "flags", ["-g", "-debug", "-version=v1", "-version=v2", "-version=v3", "-version=v4"],
257                                   "stringImports", cast(string[])[],
258                                   "DEPFILE", ["weird/path/pkg_other/source/toto.o.dep"])),
259                Target("/weird/path/pkg_other/source/toto.d")),
260 
261         );
262 
263 }
264 
265 
266 @("dub describe with empty sources")
267 unittest {
268     auto jsonString = `
269 Configuration 'library' of package test contains no source files. Please add {"targetType": "none"} to it's package description to avoid building it.
270 {
271         "rootPackage": "test",
272         "mainPackage": "test",
273         "configuration": "library",
274         "buildType": "debug",
275         "compiler": "dmd",
276         "architecture": [
277                 "x86_64"
278         ],
279         "platform": [
280                 "linux",
281                 "posix"
282         ],
283         "packages": [
284                 {
285                         "path": "/tmp/test/",
286                         "name": "test",
287                         "version": "~master",
288                         "description": "A minimal D application.",
289                         "homepage": "",
290                         "authors": [
291                                 "atila"
292                         ],
293                         "copyright": "Copyright © 2016, atila",
294                         "license": "",
295                         "dependencies": [],
296                         "active": true,
297                         "configuration": "library",
298                         "targetType": "library",
299                         "targetPath": "",
300                         "targetName": "test",
301                         "targetFileName": "libtest.a",
302                         "workingDirectory": "",
303                         "mainSourceFile": "",
304                         "dflags": [],
305                         "lflags": [],
306                         "libs": [],
307                         "copyFiles": [],
308                         "versions": [],
309                         "debugVersions": [],
310                         "importPaths": [
311                                 "source/"
312                         ],
313                         "stringImportPaths": [],
314                         "preGenerateCommands": [],
315                         "postGenerateCommands": [],
316                         "preBuildCommands": [],
317                         "postBuildCommands": [],
318                         "buildRequirements": [],
319                         "options": [],
320                         "files": []
321                 }
322         ],
323         "targets": []
324 }
325         `;
326     getDubInfo(jsonString);
327 }
328 
329 
330 immutable travisString = `
331 {
332 
333 	"rootPackage": "reggae",
334 
335 	"configuration": "executable",
336 
337 	"buildType": "debug",
338 
339 	"compiler": "dmd",
340 
341 	"architecture": [
342 
343 		"x86_64"
344 
345 	],
346 
347 	"platform": [
348 
349 		"linux",
350 
351 		"posix"
352 
353 	],
354 
355 	"packages": [
356 
357 		{
358 
359 			"path": "/home/travis/build/atilaneves/reggae/",
360 
361 			"name": "reggae",
362 
363 			"version": "~master",
364 
365 			"description": "A build system in D",
366 
367 			"homepage": "https://github.com/atilaneves/reggae",
368 
369 			"authors": [
370 
371 				"Atila Neves"
372 
373 			],
374 
375 			"copyright": "Copyright © 2015, Atila Neves",
376 
377 			"license": "BSD 3-clause",
378 
379 			"dependencies": [],
380 
381 			"active": true,
382 
383 			"configuration": "executable",
384 
385 			"targetType": "executable",
386 
387 			"targetPath": "bin",
388 
389 			"targetName": "reggae",
390 
391 			"targetFileName": "reggae",
392 
393 			"workingDirectory": "",
394 
395 			"mainSourceFile": "src/reggae/reggae_main.d",
396 
397 			"dflags": [],
398 
399 			"lflags": [],
400 
401 			"libs": [],
402 
403 			"copyFiles": [],
404 
405 			"versions": [],
406 
407 			"debugVersions": [],
408 
409 			"importPaths": [
410 
411 				"src",
412 
413 				"payload"
414 
415 			],
416 
417 			"stringImportPaths": [
418 
419 				"payload/reggae"
420 
421 			],
422 
423 			"preGenerateCommands": [],
424 
425 			"postGenerateCommands": [],
426 
427 			"preBuildCommands": [],
428 
429 			"postBuildCommands": [],
430 
431 			"buildRequirements": [],
432 
433 			"options": [],
434 
435 			"files": [
436 
437 				{
438 
439 					"role": "unusedSource",
440 
441 					"path": "bin/ut.d"
442 
443 				},
444 
445 				{
446 
447 					"role": "stringImport",
448 
449 					"path": "payload/reggae/JSON.lua"
450 
451 				},
452 
453 				{
454 
455 					"role": "stringImport",
456 
457 					"path": "payload/reggae/__init__.py"
458 
459 				},
460 
461 				{
462 
463 					"role": "source",
464 
465 					"path": "payload/reggae/backend/binary.d"
466 
467 				},
468 
469 				{
470 
471 					"role": "source",
472 
473 					"path": "payload/reggae/backend/make.d"
474 
475 				},
476 
477 				{
478 
479 					"role": "source",
480 
481 					"path": "payload/reggae/backend/ninja.d"
482 
483 				},
484 
485 				{
486 
487 					"role": "source",
488 
489 					"path": "payload/reggae/backend/package.d"
490 
491 				},
492 
493 				{
494 
495 					"role": "source",
496 
497 					"path": "payload/reggae/backend/tup.d"
498 
499 				},
500 
501 				{
502 
503 					"role": "source",
504 
505 					"path": "payload/reggae/build.d"
506 
507 				},
508 
509 				{
510 
511 					"role": "stringImport",
512 
513 					"path": "payload/reggae/build.py"
514 
515 				},
516 
517 				{
518 
519 					"role": "source",
520 
521 					"path": "payload/reggae/buildgen.d"
522 
523 				},
524 
525 				{
526 
527 					"role": "stringImport",
528 
529 					"path": "payload/reggae/buildgen_main.d"
530 
531 				},
532 
533 				{
534 
535 					"role": "source",
536 
537 					"path": "payload/reggae/config.d"
538 
539 				},
540 
541 				{
542 
543 					"role": "source",
544 
545 					"path": "payload/reggae/core/package.d"
546 
547 				},
548 
549 				{
550 
551 					"role": "source",
552 
553 					"path": "payload/reggae/core/rules/package.d"
554 
555 				},
556 
557 				{
558 
559 					"role": "source",
560 
561 					"path": "payload/reggae/ctaa.d"
562 
563 				},
564 
565 				{
566 
567 					"role": "stringImport",
568 
569 					"path": "payload/reggae/dcompile.d"
570 
571 				},
572 
573 				{
574 
575 					"role": "source",
576 
577 					"path": "payload/reggae/dependencies.d"
578 
579 				},
580 
581 				{
582 
583 					"role": "source",
584 
585 					"path": "payload/reggae/dub/info.d"
586 
587 				},
588 
589 				{
590 
591 					"role": "source",
592 
593 					"path": "payload/reggae/file.d"
594 
595 				},
596 
597 				{
598 
599 					"role": "source",
600 
601 					"path": "payload/reggae/options.d"
602 
603 				},
604 
605 				{
606 
607 					"role": "source",
608 
609 					"path": "payload/reggae/package.d"
610 
611 				},
612 
613 				{
614 
615 					"role": "source",
616 
617 					"path": "payload/reggae/range.d"
618 
619 				},
620 
621 				{
622 
623 					"role": "source",
624 
625 					"path": "payload/reggae/reflect.d"
626 
627 				},
628 
629 				{
630 
631 					"role": "stringImport",
632 
633 					"path": "payload/reggae/reflect.py"
634 
635 				},
636 
637 				{
638 
639 					"role": "stringImport",
640 
641 					"path": "payload/reggae/reggae-js.js"
642 
643 				},
644 
645 				{
646 
647 					"role": "stringImport",
648 
649 					"path": "payload/reggae/reggae.lua"
650 
651 				},
652 
653 				{
654 
655 					"role": "stringImport",
656 
657 					"path": "payload/reggae/reggae.rb"
658 
659 				},
660 
661 				{
662 
663 					"role": "stringImport",
664 
665 					"path": "payload/reggae/reggae_json_build.js"
666 
667 				},
668 
669 				{
670 
671 					"role": "stringImport",
672 
673 					"path": "payload/reggae/reggae_json_build.lua"
674 
675 				},
676 
677 				{
678 
679 					"role": "stringImport",
680 
681 					"path": "payload/reggae/reggae_json_build.py"
682 
683 				},
684 
685 				{
686 
687 					"role": "stringImport",
688 
689 					"path": "payload/reggae/reggae_json_build.rb"
690 
691 				},
692 
693 				{
694 
695 					"role": "stringImport",
696 
697 					"path": "payload/reggae/rules.py"
698 
699 				},
700 
701 				{
702 
703 					"role": "source",
704 
705 					"path": "payload/reggae/rules/c_and_cpp.d"
706 
707 				},
708 
709 				{
710 
711 					"role": "source",
712 
713 					"path": "payload/reggae/rules/common.d"
714 
715 				},
716 
717 				{
718 
719 					"role": "source",
720 
721 					"path": "payload/reggae/rules/d.d"
722 
723 				},
724 
725 				{
726 
727 					"role": "source",
728 
729 					"path": "payload/reggae/rules/dub.d"
730 
731 				},
732 
733 				{
734 
735 					"role": "source",
736 
737 					"path": "payload/reggae/rules/package.d"
738 
739 				},
740 
741 				{
742 
743 					"role": "source",
744 
745 					"path": "payload/reggae/sorting.d"
746 
747 				},
748 
749 				{
750 
751 					"role": "source",
752 
753 					"path": "payload/reggae/types.d"
754 
755 				},
756 
757 				{
758 
759 					"role": "source",
760 
761 					"path": "src/reggae/dub/call.d"
762 
763 				},
764 
765 				{
766 
767 					"role": "source",
768 
769 					"path": "src/reggae/dub/interop.d"
770 
771 				},
772 
773 				{
774 
775 					"role": "source",
776 
777 					"path": "src/reggae/dub/json.d"
778 
779 				},
780 
781 				{
782 
783 					"role": "source",
784 
785 					"path": "src/reggae/json_build.d"
786 
787 				},
788 
789 				{
790 
791 					"role": "source",
792 
793 					"path": "src/reggae/reggae.d"
794 
795 				},
796 
797 				{
798 
799 					"role": "source",
800 
801 					"path": "src/reggae/reggae_main.d"
802 
803 				},
804 
805 				{
806 
807 					"role": "unusedSource",
808 
809 					"path": "tests/it/backend/binary.d"
810 
811 				},
812 
813 				{
814 
815 					"role": "unusedSource",
816 
817 					"path": "tests/it/buildgen/arbitrary.d"
818 
819 				},
820 
821 				{
822 
823 					"role": "unusedSource",
824 
825 					"path": "tests/it/buildgen/automatic_dependency.d"
826 
827 				},
828 
829 				{
830 
831 					"role": "unusedSource",
832 
833 					"path": "tests/it/buildgen/backend_errors.d"
834 
835 				},
836 
837 				{
838 
839 					"role": "unusedSource",
840 
841 					"path": "tests/it/buildgen/code_command.d"
842 
843 				},
844 
845 				{
846 
847 					"role": "unusedSource",
848 
849 					"path": "tests/it/buildgen/empty_reggaefile.d"
850 
851 				},
852 
853 				{
854 
855 					"role": "unusedSource",
856 
857 					"path": "tests/it/buildgen/export_.d"
858 
859 				},
860 
861 				{
862 
863 					"role": "unusedSource",
864 
865 					"path": "tests/it/buildgen/implicits.d"
866 
867 				},
868 
869 				{
870 
871 					"role": "unusedSource",
872 
873 					"path": "tests/it/buildgen/multiple_outputs.d"
874 
875 				},
876 
877 				{
878 
879 					"role": "unusedSource",
880 
881 					"path": "tests/it/buildgen/optional.d"
882 
883 				},
884 
885 				{
886 
887 					"role": "unusedSource",
888 
889 					"path": "tests/it/buildgen/outputs_in_project_path.d"
890 
891 				},
892 
893 				{
894 
895 					"role": "unusedSource",
896 
897 					"path": "tests/it/buildgen/package.d"
898 
899 				},
900 
901 				{
902 
903 					"role": "unusedSource",
904 
905 					"path": "tests/it/buildgen/phony.d"
906 
907 				},
908 
909 				{
910 
911 					"role": "unusedSource",
912 
913 					"path": "tests/it/buildgen/reggaefile_errors.d"
914 
915 				},
916 
917 				{
918 
919 					"role": "unusedSource",
920 
921 					"path": "tests/it/buildgen/two_builds_reggaefile.d"
922 
923 				},
924 
925 				{
926 
927 					"role": "unusedSource",
928 
929 					"path": "tests/it/package.d"
930 
931 				},
932 
933 				{
934 
935 					"role": "unusedSource",
936 
937 					"path": "tests/it/rules/json_build.d"
938 
939 				},
940 
941 				{
942 
943 					"role": "unusedSource",
944 
945 					"path": "tests/it/rules/object_files.d"
946 
947 				},
948 
949 				{
950 
951 					"role": "unusedSource",
952 
953 					"path": "tests/it/rules/scriptlike.d"
954 
955 				},
956 
957 				{
958 
959 					"role": "unusedSource",
960 
961 					"path": "tests/it/rules/static_lib.d"
962 
963 				},
964 
965 				{
966 
967 					"role": "unusedSource",
968 
969 					"path": "tests/it/rules/unity_build.d"
970 
971 				},
972 
973 				{
974 
975 					"role": "unusedSource",
976 
977 					"path": "tests/it/runtime/dub.d"
978 
979 				},
980 
981 				{
982 
983 					"role": "unusedSource",
984 
985 					"path": "tests/it/runtime/error_messages.d"
986 
987 				},
988 
989 				{
990 
991 					"role": "unusedSource",
992 
993 					"path": "tests/it/runtime/javascript.d"
994 
995 				},
996 
997 				{
998 
999 					"role": "unusedSource",
1000 
1001 					"path": "tests/it/runtime/lua.d"
1002 
1003 				},
1004 
1005 				{
1006 
1007 					"role": "unusedSource",
1008 
1009 					"path": "tests/it/runtime/package.d"
1010 
1011 				},
1012 
1013 				{
1014 
1015 					"role": "unusedSource",
1016 
1017 					"path": "tests/it/runtime/python.d"
1018 
1019 				},
1020 
1021 				{
1022 
1023 					"role": "unusedSource",
1024 
1025 					"path": "tests/it/runtime/regressions.d"
1026 
1027 				},
1028 
1029 				{
1030 
1031 					"role": "unusedSource",
1032 
1033 					"path": "tests/it/runtime/ruby.d"
1034 
1035 				},
1036 
1037 				{
1038 
1039 					"role": "unusedSource",
1040 
1041 					"path": "tests/it/runtime/user_vars.d"
1042 
1043 				},
1044 
1045 				{
1046 
1047 					"role": "unusedSource",
1048 
1049 					"path": "tests/projects/d_and_cpp/reggaefile.d"
1050 
1051 				},
1052 
1053 				{
1054 
1055 					"role": "unusedSource",
1056 
1057 					"path": "tests/projects/d_and_cpp/src/constants.d"
1058 
1059 				},
1060 
1061 				{
1062 
1063 					"role": "unusedSource",
1064 
1065 					"path": "tests/projects/dub/imps/strings.d"
1066 
1067 				},
1068 
1069 				{
1070 
1071 					"role": "unusedSource",
1072 
1073 					"path": "tests/projects/dub_prebuild/source/lemaths.d"
1074 
1075 				},
1076 
1077 				{
1078 
1079 					"role": "unusedSource",
1080 
1081 					"path": "tests/projects/export_proj/reggaefile.d"
1082 
1083 				},
1084 
1085 				{
1086 
1087 					"role": "unusedSource",
1088 
1089 					"path": "tests/projects/implicits/reggaefile.d"
1090 
1091 				},
1092 
1093 				{
1094 
1095 					"role": "unusedSource",
1096 
1097 					"path": "tests/projects/multiple_outputs/protocol.d"
1098 
1099 				},
1100 
1101 				{
1102 
1103 					"role": "unusedSource",
1104 
1105 					"path": "tests/projects/multiple_outputs/reggaefile_sep.d"
1106 
1107 				},
1108 
1109 				{
1110 
1111 					"role": "unusedSource",
1112 
1113 					"path": "tests/projects/multiple_outputs/reggaefile_tog.d"
1114 
1115 				},
1116 
1117 				{
1118 
1119 					"role": "unusedSource",
1120 
1121 					"path": "tests/projects/opt/reggaefile.d"
1122 
1123 				},
1124 
1125 				{
1126 
1127 					"role": "unusedSource",
1128 
1129 					"path": "tests/projects/outputs_in_project_path/reggaefile.d"
1130 
1131 				},
1132 
1133 				{
1134 
1135 					"role": "unusedSource",
1136 
1137 					"path": "tests/projects/phony_proj/reggaefile.d"
1138 
1139 				},
1140 
1141 				{
1142 
1143 					"role": "unusedSource",
1144 
1145 					"path": "tests/projects/project1/reggaefile.d"
1146 
1147 				},
1148 
1149 				{
1150 
1151 					"role": "unusedSource",
1152 
1153 					"path": "tests/projects/project1/src/maths.d"
1154 
1155 				},
1156 
1157 				{
1158 
1159 					"role": "unusedSource",
1160 
1161 					"path": "tests/projects/project2/reggaefile.d"
1162 
1163 				},
1164 
1165 				{
1166 
1167 					"role": "unusedSource",
1168 
1169 					"path": "tests/projects/project2/source/foo.d"
1170 
1171 				},
1172 
1173 				{
1174 
1175 					"role": "unusedSource",
1176 
1177 					"path": "tests/projects/scriptlike/d/constants.d"
1178 
1179 				},
1180 
1181 				{
1182 
1183 					"role": "unusedSource",
1184 
1185 					"path": "tests/projects/scriptlike/d/logger.d"
1186 
1187 				},
1188 
1189 				{
1190 
1191 					"role": "unusedSource",
1192 
1193 					"path": "tests/projects/scriptlike/reggaefile.d"
1194 
1195 				},
1196 
1197 				{
1198 
1199 					"role": "unusedSource",
1200 
1201 					"path": "tests/projects/static_lib/libsrc/adder.d"
1202 
1203 				},
1204 
1205 				{
1206 
1207 					"role": "unusedSource",
1208 
1209 					"path": "tests/projects/static_lib/libsrc/muler.d"
1210 
1211 				},
1212 
1213 				{
1214 
1215 					"role": "unusedSource",
1216 
1217 					"path": "tests/projects/static_lib/reggaefile.d"
1218 
1219 				},
1220 
1221 				{
1222 
1223 					"role": "unusedSource",
1224 
1225 					"path": "tests/projects/template_rules/reggaefile.d"
1226 
1227 				},
1228 
1229 				{
1230 
1231 					"role": "unusedSource",
1232 
1233 					"path": "tests/projects/unity/reggaefile.d"
1234 
1235 				},
1236 
1237 				{
1238 
1239 					"role": "unusedSource",
1240 
1241 					"path": "tests/ut/backend/binary.d"
1242 
1243 				},
1244 
1245 				{
1246 
1247 					"role": "unusedSource",
1248 
1249 					"path": "tests/ut/build.d"
1250 
1251 				},
1252 
1253 				{
1254 
1255 					"role": "unusedSource",
1256 
1257 					"path": "tests/ut/by_package.d"
1258 
1259 				},
1260 
1261 				{
1262 
1263 					"role": "unusedSource",
1264 
1265 					"path": "tests/ut/code_command.d"
1266 
1267 				},
1268 
1269 				{
1270 
1271 					"role": "unusedSource",
1272 
1273 					"path": "tests/ut/cpprules.d"
1274 
1275 				},
1276 
1277 				{
1278 
1279 					"role": "unusedSource",
1280 
1281 					"path": "tests/ut/ctaa.d"
1282 
1283 				},
1284 
1285 				{
1286 
1287 					"role": "unusedSource",
1288 
1289 					"path": "tests/ut/default_options.d"
1290 
1291 				},
1292 
1293 				{
1294 
1295 					"role": "unusedSource",
1296 
1297 					"path": "tests/ut/default_rules.d"
1298 
1299 				},
1300 
1301 				{
1302 
1303 					"role": "unusedSource",
1304 
1305 					"path": "tests/ut/dependencies.d"
1306 
1307 				},
1308 
1309 				{
1310 
1311 					"role": "unusedSource",
1312 
1313 					"path": "tests/ut/drules.d"
1314 
1315 				},
1316 
1317 				{
1318 
1319 					"role": "unusedSource",
1320 
1321 					"path": "tests/ut/dub_call.d"
1322 
1323 				},
1324 
1325 				{
1326 
1327 					"role": "unusedSource",
1328 
1329 					"path": "tests/ut/dub_json.d"
1330 
1331 				},
1332 
1333 				{
1334 
1335 					"role": "unusedSource",
1336 
1337 					"path": "tests/ut/high_rules.d"
1338 
1339 				},
1340 
1341 				{
1342 
1343 					"role": "unusedSource",
1344 
1345 					"path": "tests/ut/json_build/rules.d"
1346 
1347 				},
1348 
1349 				{
1350 
1351 					"role": "unusedSource",
1352 
1353 					"path": "tests/ut/json_build/simple.d"
1354 
1355 				},
1356 
1357 				{
1358 
1359 					"role": "unusedSource",
1360 
1361 					"path": "tests/ut/ninja.d"
1362 
1363 				},
1364 
1365 				{
1366 
1367 					"role": "unusedSource",
1368 
1369 					"path": "tests/ut/range.d"
1370 
1371 				},
1372 
1373 				{
1374 
1375 					"role": "unusedSource",
1376 
1377 					"path": "tests/ut/realistic_build.d"
1378 
1379 				},
1380 
1381 				{
1382 
1383 					"role": "unusedSource",
1384 
1385 					"path": "tests/ut/reflect.d"
1386 
1387 				},
1388 
1389 				{
1390 
1391 					"role": "unusedSource",
1392 
1393 					"path": "tests/ut/rules/link.d"
1394 
1395 				},
1396 
1397 				{
1398 
1399 					"role": "unusedSource",
1400 
1401 					"path": "tests/ut/serialisation.d"
1402 
1403 				},
1404 
1405 				{
1406 
1407 					"role": "unusedSource",
1408 
1409 					"path": "tests/ut/simple_bar_reggaefile.d"
1410 
1411 				},
1412 
1413 				{
1414 
1415 					"role": "unusedSource",
1416 
1417 					"path": "tests/ut/simple_foo_reggaefile.d"
1418 
1419 				},
1420 
1421 				{
1422 
1423 					"role": "unusedSource",
1424 
1425 					"path": "tests/ut/tup.d"
1426 
1427 				},
1428 
1429 				{
1430 
1431 					"role": "unusedSource",
1432 
1433 					"path": "tests/utils.d"
1434 
1435 				}
1436 
1437 			]
1438 
1439 		},
1440 
1441 		{
1442 
1443 			"path": "/home/travis/.dub/packages/unit-threaded-0.6.14/unit-threaded/",
1444 
1445 			"name": "unit-threaded",
1446 
1447 			"version": "0.6.14",
1448 
1449 			"description": "Advanced multi-threaded unit testing framework with minimal to no boilerplate using built-in unittest blocks",
1450 
1451 			"homepage": "https://github.com/atilaneves/unit-threaded",
1452 
1453 			"authors": [
1454 
1455 				"Atila Neves"
1456 
1457 			],
1458 
1459 			"copyright": "Copyright © 2013, Atila Neves",
1460 
1461 			"license": "BSD 3-clause",
1462 
1463 			"dependencies": [],
1464 
1465 			"active": false,
1466 
1467 			"configuration": "library",
1468 
1469 			"targetType": "library",
1470 
1471 			"targetPath": "",
1472 
1473 			"targetName": "unit-threaded",
1474 
1475 			"targetFileName": "libunit-threaded.a",
1476 
1477 			"workingDirectory": "",
1478 
1479 			"mainSourceFile": "",
1480 
1481 			"dflags": [],
1482 
1483 			"lflags": [],
1484 
1485 			"libs": [],
1486 
1487 			"copyFiles": [],
1488 
1489 			"versions": [],
1490 
1491 			"debugVersions": [],
1492 
1493 			"importPaths": [
1494 
1495 				"source/"
1496 
1497 			],
1498 
1499 			"stringImportPaths": [],
1500 
1501 			"preGenerateCommands": [],
1502 
1503 			"postGenerateCommands": [],
1504 
1505 			"preBuildCommands": [],
1506 
1507 			"postBuildCommands": [],
1508 
1509 			"buildRequirements": [],
1510 
1511 			"options": [],
1512 
1513 			"files": [
1514 
1515 				{
1516 
1517 					"role": "unusedSource",
1518 
1519 					"path": "example/example_pass.d"
1520 
1521 				},
1522 
1523 				{
1524 
1525 					"role": "unusedSource",
1526 
1527 					"path": "gen/gen_ut_main.d"
1528 
1529 				},
1530 
1531 				{
1532 
1533 					"role": "source",
1534 
1535 					"path": "source/unit_threaded/asserts.d"
1536 
1537 				},
1538 
1539 				{
1540 
1541 					"role": "source",
1542 
1543 					"path": "source/unit_threaded/attrs.d"
1544 
1545 				},
1546 
1547 				{
1548 
1549 					"role": "source",
1550 
1551 					"path": "source/unit_threaded/dub.d"
1552 
1553 				},
1554 
1555 				{
1556 
1557 					"role": "source",
1558 
1559 					"path": "source/unit_threaded/factory.d"
1560 
1561 				},
1562 
1563 				{
1564 
1565 					"role": "source",
1566 
1567 					"path": "source/unit_threaded/integration.d"
1568 
1569 				},
1570 
1571 				{
1572 
1573 					"role": "source",
1574 
1575 					"path": "source/unit_threaded/io.d"
1576 
1577 				},
1578 
1579 				{
1580 
1581 					"role": "source",
1582 
1583 					"path": "source/unit_threaded/meta.d"
1584 
1585 				},
1586 
1587 				{
1588 
1589 					"role": "source",
1590 
1591 					"path": "source/unit_threaded/options.d"
1592 
1593 				},
1594 
1595 				{
1596 
1597 					"role": "source",
1598 
1599 					"path": "source/unit_threaded/package.d"
1600 
1601 				},
1602 
1603 				{
1604 
1605 					"role": "source",
1606 
1607 					"path": "source/unit_threaded/reflection.d"
1608 
1609 				},
1610 
1611 				{
1612 
1613 					"role": "source",
1614 
1615 					"path": "source/unit_threaded/runner.d"
1616 
1617 				},
1618 
1619 				{
1620 
1621 					"role": "source",
1622 
1623 					"path": "source/unit_threaded/runtime.d"
1624 
1625 				},
1626 
1627 				{
1628 
1629 					"role": "source",
1630 
1631 					"path": "source/unit_threaded/should.d"
1632 
1633 				},
1634 
1635 				{
1636 
1637 					"role": "source",
1638 
1639 					"path": "source/unit_threaded/testcase.d"
1640 
1641 				},
1642 
1643 				{
1644 
1645 					"role": "source",
1646 
1647 					"path": "source/unit_threaded/tests/module_with_attrs.d"
1648 
1649 				},
1650 
1651 				{
1652 
1653 					"role": "source",
1654 
1655 					"path": "source/unit_threaded/tests/module_with_tests.d"
1656 
1657 				},
1658 
1659 				{
1660 
1661 					"role": "source",
1662 
1663 					"path": "source/unit_threaded/tests/parametrized.d"
1664 
1665 				},
1666 
1667 				{
1668 
1669 					"role": "source",
1670 
1671 					"path": "source/unit_threaded/tests/tags.d"
1672 
1673 				},
1674 
1675 				{
1676 
1677 					"role": "source",
1678 
1679 					"path": "source/unit_threaded/testsuite.d"
1680 
1681 				},
1682 
1683 				{
1684 
1685 					"role": "source",
1686 
1687 					"path": "source/unit_threaded/uda.d"
1688 
1689 				},
1690 
1691 				{
1692 
1693 					"role": "unusedSource",
1694 
1695 					"path": "tests/pass/attributes.d"
1696 
1697 				},
1698 
1699 				{
1700 
1701 					"role": "unusedSource",
1702 
1703 					"path": "tests/pass/delayed.d"
1704 
1705 				},
1706 
1707 				{
1708 
1709 					"role": "unusedSource",
1710 
1711 					"path": "tests/pass/fixtures.d"
1712 
1713 				},
1714 
1715 				{
1716 
1717 					"role": "unusedSource",
1718 
1719 					"path": "tests/pass/io.d"
1720 
1721 				},
1722 
1723 				{
1724 
1725 					"role": "unusedSource",
1726 
1727 					"path": "tests/pass/normal.d"
1728 
1729 				},
1730 
1731 				{
1732 
1733 					"role": "unusedSource",
1734 
1735 					"path": "tests/pass/register.d"
1736 
1737 				}
1738 
1739 			]
1740 
1741 		}
1742 
1743 	],
1744 
1745 	"targets": [
1746 
1747 		{
1748 
1749 			"rootPackage": "reggae",
1750 
1751 			"packages": [
1752 
1753 				"reggae"
1754 
1755 			],
1756 
1757 			"rootConfiguration": "executable",
1758 
1759 			"buildSettings": {
1760 
1761 				"targetType": 2,
1762 
1763 				"targetPath": "/home/travis/build/atilaneves/reggae/bin",
1764 
1765 				"targetName": "reggae",
1766 
1767 				"workingDirectory": "",
1768 
1769 				"mainSourceFile": "/home/travis/build/atilaneves/reggae/src/reggae/reggae_main.d",
1770 
1771 				"dflags": [],
1772 
1773 				"lflags": [],
1774 
1775 				"libs": [],
1776 
1777 				"linkerFiles": [],
1778 
1779 				"sourceFiles": [
1780 
1781 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/binary.d",
1782 
1783 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/make.d",
1784 
1785 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/ninja.d",
1786 
1787 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/package.d",
1788 
1789 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/tup.d",
1790 
1791 					"/home/travis/build/atilaneves/reggae/payload/reggae/build.d",
1792 
1793 					"/home/travis/build/atilaneves/reggae/payload/reggae/buildgen.d",
1794 
1795 					"/home/travis/build/atilaneves/reggae/payload/reggae/config.d",
1796 
1797 					"/home/travis/build/atilaneves/reggae/payload/reggae/core/package.d",
1798 
1799 					"/home/travis/build/atilaneves/reggae/payload/reggae/core/rules/package.d",
1800 
1801 					"/home/travis/build/atilaneves/reggae/payload/reggae/ctaa.d",
1802 
1803 					"/home/travis/build/atilaneves/reggae/payload/reggae/dependencies.d",
1804 
1805 					"/home/travis/build/atilaneves/reggae/payload/reggae/dub/info.d",
1806 
1807 					"/home/travis/build/atilaneves/reggae/payload/reggae/file.d",
1808 
1809 					"/home/travis/build/atilaneves/reggae/payload/reggae/options.d",
1810 
1811 					"/home/travis/build/atilaneves/reggae/payload/reggae/package.d",
1812 
1813 					"/home/travis/build/atilaneves/reggae/payload/reggae/range.d",
1814 
1815 					"/home/travis/build/atilaneves/reggae/payload/reggae/reflect.d",
1816 
1817 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/c_and_cpp.d",
1818 
1819 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/common.d",
1820 
1821 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/d.d",
1822 
1823 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/dub.d",
1824 
1825 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/package.d",
1826 
1827 					"/home/travis/build/atilaneves/reggae/payload/reggae/sorting.d",
1828 
1829 					"/home/travis/build/atilaneves/reggae/payload/reggae/types.d",
1830 
1831 					"/home/travis/build/atilaneves/reggae/src/reggae/dub/call.d",
1832 
1833 					"/home/travis/build/atilaneves/reggae/src/reggae/dub/interop.d",
1834 
1835 					"/home/travis/build/atilaneves/reggae/src/reggae/dub/json.d",
1836 
1837 					"/home/travis/build/atilaneves/reggae/src/reggae/json_build.d",
1838 
1839 					"/home/travis/build/atilaneves/reggae/src/reggae/reggae.d",
1840 
1841 					"/home/travis/build/atilaneves/reggae/src/reggae/reggae_main.d"
1842 
1843 				],
1844 
1845 				"copyFiles": [],
1846 
1847 				"versions": [
1848 
1849 					"Have_reggae"
1850 
1851 				],
1852 
1853 				"debugVersions": [],
1854 
1855 				"importPaths": [
1856 
1857 					"/home/travis/build/atilaneves/reggae/src",
1858 
1859 					"/home/travis/build/atilaneves/reggae/payload"
1860 
1861 				],
1862 
1863 				"stringImportPaths": [
1864 
1865 					"/home/travis/build/atilaneves/reggae/payload/reggae"
1866 
1867 				],
1868 
1869 				"importFiles": [],
1870 
1871 				"stringImportFiles": [
1872 
1873 					"/home/travis/build/atilaneves/reggae/payload/reggae/JSON.lua",
1874 
1875 					"/home/travis/build/atilaneves/reggae/payload/reggae/__init__.py",
1876 
1877 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/binary.d",
1878 
1879 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/make.d",
1880 
1881 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/ninja.d",
1882 
1883 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/package.d",
1884 
1885 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/tup.d",
1886 
1887 					"/home/travis/build/atilaneves/reggae/payload/reggae/build.d",
1888 
1889 					"/home/travis/build/atilaneves/reggae/payload/reggae/build.py",
1890 
1891 					"/home/travis/build/atilaneves/reggae/payload/reggae/buildgen.d",
1892 
1893 					"/home/travis/build/atilaneves/reggae/payload/reggae/buildgen_main.d",
1894 
1895 					"/home/travis/build/atilaneves/reggae/payload/reggae/config.d",
1896 
1897 					"/home/travis/build/atilaneves/reggae/payload/reggae/ctaa.d",
1898 
1899 					"/home/travis/build/atilaneves/reggae/payload/reggae/dcompile.d",
1900 
1901 					"/home/travis/build/atilaneves/reggae/payload/reggae/dependencies.d",
1902 
1903 					"/home/travis/build/atilaneves/reggae/payload/reggae/dub/info.d",
1904 
1905 					"/home/travis/build/atilaneves/reggae/payload/reggae/file.d",
1906 
1907 					"/home/travis/build/atilaneves/reggae/payload/reggae/options.d",
1908 
1909 					"/home/travis/build/atilaneves/reggae/payload/reggae/range.d",
1910 
1911 					"/home/travis/build/atilaneves/reggae/payload/reggae/reflect.d",
1912 
1913 					"/home/travis/build/atilaneves/reggae/payload/reggae/reflect.py",
1914 
1915 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae-js.js",
1916 
1917 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae.lua",
1918 
1919 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae.rb",
1920 
1921 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae_json_build.js",
1922 
1923 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae_json_build.lua",
1924 
1925 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae_json_build.py",
1926 
1927 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae_json_build.rb",
1928 
1929 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules.py",
1930 
1931 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/c_and_cpp.d",
1932 
1933 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/common.d",
1934 
1935 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/d.d",
1936 
1937 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/dub.d",
1938 
1939 					"/home/travis/build/atilaneves/reggae/payload/reggae/sorting.d",
1940 
1941 					"/home/travis/build/atilaneves/reggae/payload/reggae/types.d"
1942 
1943 				],
1944 
1945 				"preGenerateCommands": [],
1946 
1947 				"postGenerateCommands": [],
1948 
1949 				"preBuildCommands": [],
1950 
1951 				"postBuildCommands": [],
1952 
1953 				"requirements": [],
1954 
1955 				"options": [
1956 
1957 					"debugMode",
1958 
1959 					"debugInfo",
1960 
1961 					"warningsAsErrors"
1962 
1963 				]
1964 
1965 			},
1966 
1967 			"dependencies": [],
1968 
1969 			"linkDependencies": []
1970 
1971 		}
1972 
1973 	]
1974 
1975 }
1976 `;
1977 
1978 @("travis string")
1979 unittest {
1980     getDubInfo(travisString);
1981 }